mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    Class GltfUtility

    Inheritance
    Object
    GltfUtility
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    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

    GltfObject

    Remarks

    Returned GltfObject still needs to be initialized using ConstructAsync(GltfObject).

    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

    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

    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

    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.

    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.

    In This Article
    • Methods
      • GetGltfObjectFromGlb(Byte[])
      • GetGltfObjectFromGlb(Byte[])
      • GetGltfObjectFromJson(String)
      • GetGltfObjectFromJson(String)
      • ImportGltfObjectFromPathAsync(String)
      • ImportGltfObjectFromPathAsync(String)
    Back to top Generated by DocFX