Class AwaitableTextureDownload
Default ITextureDownload implementation that loads texture URIs via UnityWebRequest.
Inherited Members
Namespace: GLTFast.Loading
Syntax
public class AwaitableTextureDownload : AwaitableDownload, ITextureDownload, IDownload, IDisposable
Constructors
AwaitableTextureDownload()
Parameter-less constructor, required for inheritance.
Declaration
protected AwaitableTextureDownload()
AwaitableTextureDownload(Uri, Boolean)
Default constructor.
Declaration
public AwaitableTextureDownload(Uri url, bool nonReadable)
Parameters
Type | Name | Description |
---|---|---|
Uri | url | Texture URI to request |
Boolean | nonReadable | If true, resulting texture is not CPU readable (uses less memory) |
Properties
Texture
Resulting texture
Declaration
public Texture2D Texture { get; }
Property Value
Type | Description |
---|---|
Texture2D |
Implements
Methods
CreateRequest(Uri, Boolean)
Generates the UnityWebRequest used for sending the request.
Declaration
protected static UnityWebRequest CreateRequest(Uri url, bool nonReadable)
Parameters
Type | Name | Description |
---|---|---|
Uri | url | Texture URI to request |
Boolean | nonReadable | If true, resulting texture is not CPU readable (uses less memory) |
Returns
Type | Description |
---|---|
UnityWebRequest | UnityWebRequest used for sending the request |