docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RootBase

    The root object for a glTF asset.

    Inheritance
    object
    RootBase
    RootBase<TAccessor, TAnimation, TAsset, TBuffer, TBufferView, TCamera, TExtensions, TImage, TMaterial, TMesh, TNode, TSampler, TScene, TSkin, TTexture>
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: GLTFast.Schema
    Assembly: solution.dll
    Syntax
    [Serializable]
    public abstract class RootBase

    Fields

    extensionsRequired

    Names of glTF extensions required to properly load this asset.

    Declaration
    public string[] extensionsRequired
    Field Value
    Type Description
    string[]
    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
    public string[] extensionsUsed
    Field Value
    Type Description
    string[]
    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
    public int scene
    Field Value
    Type Description
    int
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Properties

    Accessors

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

    Declaration
    public abstract IReadOnlyList<AccessorBase> Accessors { get; }
    Property Value
    Type Description
    IReadOnlyList<AccessorBase>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Animations

    An array of keyframe animations.

    Declaration
    public abstract IReadOnlyList<AnimationBase> Animations { get; }
    Property Value
    Type Description
    IReadOnlyList<AnimationBase>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Asset

    Metadata about the glTF asset.

    Declaration
    public abstract Asset Asset { get; }
    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
    public abstract IReadOnlyList<BufferViewBase> BufferViews { get; }
    Property Value
    Type Description
    IReadOnlyList<BufferViewBase>
    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
    public abstract IReadOnlyList<Buffer> Buffers { get; }
    Property Value
    Type Description
    IReadOnlyList<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
    public abstract IReadOnlyList<CameraBase> Cameras { get; }
    Property Value
    Type Description
    IReadOnlyList<CameraBase>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Extensions

    glTF root extensions

    Declaration
    public abstract RootExtensions Extensions { get; }
    Property Value
    Type Description
    RootExtensions
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    HasAnimation

    Declaration
    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
    public abstract IReadOnlyList<Image> Images { get; }
    Property Value
    Type Description
    IReadOnlyList<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
    public abstract IReadOnlyList<MaterialBase> Materials { get; }
    Property Value
    Type Description
    IReadOnlyList<MaterialBase>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Meshes

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

    Declaration
    public abstract IReadOnlyList<MeshBase> Meshes { get; }
    Property Value
    Type Description
    IReadOnlyList<MeshBase>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Nodes

    An array of nodes.

    Declaration
    public abstract IReadOnlyList<NodeBase> Nodes { get; }
    Property Value
    Type Description
    IReadOnlyList<NodeBase>
    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
    public abstract IReadOnlyList<Sampler> Samplers { get; }
    Property Value
    Type Description
    IReadOnlyList<Sampler>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Scenes

    An array of scenes.

    Declaration
    public abstract IReadOnlyList<Scene> Scenes { get; }
    Property Value
    Type Description
    IReadOnlyList<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
    public abstract IReadOnlyList<Skin> Skins { get; }
    Property Value
    Type Description
    IReadOnlyList<Skin>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Textures

    An array of textures.

    Declaration
    public abstract IReadOnlyList<TextureBase> Textures { get; }
    Property Value
    Type Description
    IReadOnlyList<TextureBase>
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    Methods

    GltfSerialize(StreamWriter)

    Serialization to JSON

    Declaration
    public void GltfSerialize(StreamWriter stream)
    Parameters
    Type Name Description
    StreamWriter stream

    Stream the JSON string is being written to.

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

    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

    JsonUtilityCleanup()

    Cleans up invalid parsing artifacts created by GltfJsonUtilityParser. If you inherit a custom Root class (for use with GltfImport.LoadWithCustomSchema<T>(string,ImportSettings,System.Threading.CancellationToken) ) you can override this method to perform sanity checks on the deserialized, custom properties.

    Declaration
    public virtual void JsonUtilityCleanup()
    See Also
    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf

    See Also

    https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf
    In This Article
    Back to top
    Copyright © 2024 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)