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 |
---|---|
Gltf |
Remarks
Returned Gltf
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 |
---|---|
Gltf |
Remarks
Returned Gltf
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<Gltf |
New Gltf |
Remarks
Must be called from the main thread. If the Application.isPlaying is false, then this method will run synchronously.