Class GltfUtility
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Utilities.Gltf.Serialization
Assembly: cs.temp.dll.dll
Syntax
public static class GltfUtility
Methods
GetGltfObjectFromGlb(Byte[])
Gets a glTF object from the provided byte array
Declaration
public static GltfObject GetGltfObjectFromGlb(byte[] glbData)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | glbData | Raw glb byte data. |
Returns
Type | Description |
---|---|
GltfObject |
Remarks
Returned GltfObject still needs to be initialized using ConstructAsync(GltfObject).
GetGltfObjectFromJson(String)
Gets a glTF object from the provided json string.
Declaration
public static GltfObject GetGltfObjectFromJson(string jsonString)
Parameters
Type | Name | Description |
---|---|---|
String | jsonString | String defining a glTF Object. |
Returns
Type | Description |
---|---|
GltfObject |
Remarks
Returned GltfObject still needs to be initialized using ConstructAsync(GltfObject).
ImportGltfObjectFromPathAsync(String)
Imports a glTF object from the provided uri.
Declaration
public static Task<GltfObject> ImportGltfObjectFromPathAsync(string uri)
Parameters
Type | Name | Description |
---|---|---|
String | uri | the path to the file to load |
Returns
Type | Description |
---|---|
Task<GltfObject> | New GltfObject imported from uri. |
Remarks
Must be called from the main thread. If the Application.isPlaying is false, then this method will run synchronously.