Method Load
Load(string, ImportSettings, CancellationToken)
Load a glTF file (JSON or binary) The URL can be a file path (using the "file://" scheme) or a web address.
Declaration
public Task<bool> Load(string url, ImportSettings importSettings = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | url | Uniform Resource Locator. Can be a file path (using the "file://" scheme) or a web address. |
ImportSettings | importSettings | Import Settings (ImportSettings for details) |
CancellationToken | cancellationToken | Token to submit cancellation requests. The default value is None. |
Returns
Type | Description |
---|---|
Task<bool> | True if loading was successful, false otherwise |
Load(Uri, ImportSettings, CancellationToken)
Load a glTF file (JSON or binary) The URL can be a file path (using the "file://" scheme) or a web address.
Declaration
public Task<bool> Load(Uri url, ImportSettings importSettings = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Uri | url | Uniform Resource Locator. Can be a file path (using the "file://" scheme) or a web address. |
ImportSettings | importSettings | Import Settings (ImportSettings for details) |
CancellationToken | cancellationToken | Token to submit cancellation requests. The default value is None. |
Returns
Type | Description |
---|---|
Task<bool> | True if loading was successful, false otherwise |
Load(byte[], Uri, ImportSettings, CancellationToken)
Load a glTF from a byte array. If the type (JSON or glTF-Binary) is known, LoadGltfJson(string, Uri, ImportSettings, CancellationToken) and LoadGltfBinary(byte[], Uri, ImportSettings, CancellationToken) should be preferred.
Declaration
public Task<bool> Load(byte[] data, Uri uri = null, ImportSettings importSettings = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
byte[] | data | Either glTF-Binary data or a glTF JSON |
Uri | uri | Base URI for relative paths of external buffers or images |
ImportSettings | importSettings | Import Settings (ImportSettings for details) |
CancellationToken | cancellationToken | Token to submit cancellation requests. The default value is None. |
Returns
Type | Description |
---|---|
Task<bool> | True if loading was successful, false otherwise |