docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Root

    The root object for a glTF asset.

    Inheritance
    object
    Root
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Cloud.Gltfast.Objects
    Assembly: Unity.Cloud.Gltfast.dll
    Syntax
    [MovedFrom(true, "GLTFast.Schema", "glTFast", null)]
    public class Root

    Properties

    Accessors

    An array of accessors. An accessor is a typed view into a bufferView.

    Declaration
    [JsonPropertyName("accessors")]
    public List<Accessor> Accessors { get; set; }
    Property Value
    Type Description
    List<Accessor>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    AdditionalProperties

    Additional properties on glTF JSON objects. Those properties may have been added by a new, unsupported version of the glTF specification. For extending glTF, please use extensions or extras instead.

    Declaration
    [JsonIgnore]
    public ReadOnlyProperties AdditionalProperties { get; }
    Property Value
    Type Description
    ReadOnlyProperties
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Animations

    An array of keyframe animations.

    Declaration
    [JsonPropertyName("animations")]
    public List<Animation> Animations { get; set; }
    Property Value
    Type Description
    List<Animation>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Asset

    Metadata about the glTF asset.

    Declaration
    [JsonPropertyName("asset")]
    public Asset Asset { get; set; }
    Property Value
    Type Description
    Asset
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    BufferViews

    An array of bufferViews. A bufferView is a view into a buffer generally representing a subset of the buffer.

    Declaration
    [JsonPropertyName("bufferViews")]
    public List<BufferView> BufferViews { get; set; }
    Property Value
    Type Description
    List<BufferView>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Buffers

    An array of buffers. A buffer points to binary geometry, animation, or skins.

    Declaration
    [JsonPropertyName("buffers")]
    public List<Buffer> Buffers { get; set; }
    Property Value
    Type Description
    List<Buffer>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Cameras

    An array of cameras. A camera defines a projection matrix.

    Declaration
    [JsonPropertyName("cameras")]
    public List<Camera> Cameras { get; set; }
    Property Value
    Type Description
    List<Camera>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Extensions

    glTF root extensions

    Declaration
    [JsonPropertyName("extensions")]
    public RootExtensions Extensions { get; set; }
    Property Value
    Type Description
    RootExtensions
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    ExtensionsRequired

    Names of glTF extensions required to properly load this asset.

    Declaration
    [JsonPropertyName("extensionsRequired")]
    [JsonConverter(typeof(ExtensionListConverter))]
    public List<EnumOrRawValue<Extension>> ExtensionsRequired { get; set; }
    Property Value
    Type Description
    List<EnumOrRawValue<Extension>>
    Remarks

    Recognized extensions deserialize into Value. Unknown extensions are kept as UTF-8 bytes in RawValue; in that case Value is not authoritative.

    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    ExtensionsUsed

    Names of glTF extensions used somewhere in this asset.

    Declaration
    [JsonPropertyName("extensionsUsed")]
    [JsonConverter(typeof(ExtensionListConverter))]
    public List<EnumOrRawValue<Extension>> ExtensionsUsed { get; set; }
    Property Value
    Type Description
    List<EnumOrRawValue<Extension>>
    Remarks

    Recognized extensions deserialize into Value. Unknown extensions are kept as UTF-8 bytes in RawValue; in that case Value is not authoritative.

    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Extras

    Application-specific data.

    Declaration
    [JsonPropertyName("extras")]
    [JsonConverter(typeof(ExtrasConverter))]
    public ExtrasContainer Extras { get; set; }
    Property Value
    Type Description
    ExtrasContainer
    See Also
    https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-extras

    HasAnimation

    Declaration
    [JsonIgnore]
    public bool HasAnimation { get; }
    Property Value
    Type Description
    bool
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Images

    An array of images. An image defines data used to create a texture.

    Declaration
    [JsonPropertyName("images")]
    public List<Image> Images { get; set; }
    Property Value
    Type Description
    List<Image>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Materials

    An array of materials. A material defines the appearance of a primitive.

    Declaration
    [JsonPropertyName("materials")]
    public List<Material> Materials { get; set; }
    Property Value
    Type Description
    List<Material>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    MaterialsVariantsCount

    Number of materials variants.

    Declaration
    [JsonIgnore]
    public int MaterialsVariantsCount { get; }
    Property Value
    Type Description
    int
    See Also
    https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_variants

    Meshes

    An array of meshes. A mesh is a set of primitives to be rendered.

    Declaration
    [JsonPropertyName("meshes")]
    public List<Mesh> Meshes { get; set; }
    Property Value
    Type Description
    List<Mesh>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Nodes

    An array of nodes.

    Declaration
    [JsonPropertyName("nodes")]
    public List<Node> Nodes { get; set; }
    Property Value
    Type Description
    List<Node>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Samplers

    An array of samplers. A sampler contains properties for texture filtering and wrapping modes.

    Declaration
    [JsonPropertyName("samplers")]
    public List<Sampler> Samplers { get; set; }
    Property Value
    Type Description
    List<Sampler>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Scene

    The index of the default scene.

    Declaration
    [JsonPropertyName("scene")]
    public int? Scene { get; set; }
    Property Value
    Type Description
    int?
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Scenes

    An array of scenes.

    Declaration
    [JsonPropertyName("scenes")]
    public List<Scene> Scenes { get; set; }
    Property Value
    Type Description
    List<Scene>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Skins

    An array of skins. A skin is defined by joints and matrices.

    Declaration
    [JsonPropertyName("skins")]
    public List<Skin> Skins { get; set; }
    Property Value
    Type Description
    List<Skin>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Textures

    An array of textures.

    Declaration
    [JsonPropertyName("textures")]
    public List<Texture> Textures { get; set; }
    Property Value
    Type Description
    List<Texture>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Methods

    GetMaterialsVariantName(int)

    Gets the name of a specific materials variant.

    Declaration
    public string GetMaterialsVariantName(int index)
    Parameters
    Type Name Description
    int index

    Materials variant index.

    Returns
    Type Description
    string

    Name of a materials variant.

    See Also
    https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_variants

    IsAccessorInterleaved(int)

    Looks up if a certain accessor points to interleaved data.

    Declaration
    public bool IsAccessorInterleaved(int accessorIndex)
    Parameters
    Type Name Description
    int accessorIndex

    Accessor index

    Returns
    Type Description
    bool

    True if accessor is interleaved, false if its data is continuous.

    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Extension Methods

    RootExtension.Serialize(Root, Stream)

    See Also

    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)