Class Root
The root object for a glTF asset.
Inherited Members
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
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
Animations
An array of keyframe animations.
Declaration
[JsonPropertyName("animations")]
public List<Animation> Animations { get; set; }
Property Value
| Type | Description |
|---|---|
| List<Animation> |
See Also
Asset
Metadata about the glTF asset.
Declaration
[JsonPropertyName("asset")]
public Asset Asset { get; set; }
Property Value
| Type | Description |
|---|---|
| Asset |
See Also
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
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
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
Extensions
glTF root extensions
Declaration
[JsonPropertyName("extensions")]
public RootExtensions Extensions { get; set; }
Property Value
| Type | Description |
|---|---|
| RootExtensions |
See Also
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
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
Extras
Application-specific data.
Declaration
[JsonPropertyName("extras")]
[JsonConverter(typeof(ExtrasConverter))]
public ExtrasContainer Extras { get; set; }
Property Value
| Type | Description |
|---|---|
| ExtrasContainer |
See Also
HasAnimation
Declaration
[JsonIgnore]
public bool HasAnimation { get; }
Property Value
| Type | Description |
|---|---|
| bool |
See Also
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
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
MaterialsVariantsCount
Number of materials variants.
Declaration
[JsonIgnore]
public int MaterialsVariantsCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
See Also
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
Nodes
An array of nodes.
Declaration
[JsonPropertyName("nodes")]
public List<Node> Nodes { get; set; }
Property Value
| Type | Description |
|---|---|
| List<Node> |
See Also
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
Scene
The index of the default scene.
Declaration
[JsonPropertyName("scene")]
public int? Scene { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
See Also
Scenes
An array of scenes.
Declaration
[JsonPropertyName("scenes")]
public List<Scene> Scenes { get; set; }
Property Value
| Type | Description |
|---|---|
| List<Scene> |
See Also
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
Textures
An array of textures.
Declaration
[JsonPropertyName("textures")]
public List<Texture> Textures { get; set; }
Property Value
| Type | Description |
|---|---|
| List<Texture> |
See Also
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
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. |