reckfellENGINE

GltfState

Represents all data of a glTF file.

On this page
class GltfStateReckfellSharpInherits Resource

Represents all data of a glTF file.

Contains all nodes and resources of a glTF file. This is used by GltfDocument as data storage, which allows GltfDocument and all GltfDocumentExtension classes to remain stateless. GLTFState can be populated by GltfDocument reading a file or by converting a Reckfell scene. Then the data can either be used to create a Reckfell scene or save to a glTF file. The code that converts to/from a Reckfell scene can be intercepted at arbitrary points by GltfDocumentExtension classes. This allows for custom data to be stored in the glTF file or for custom data to be converted to/from Reckfell nodes.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

GltfStateConstructor
# GltfState
C#
public GltfState();

Properties31

AccessorsProperty
# Accessors
C#
public Reckfell.Collections.Array<GltfAccessor> Accessors { get; set; }
AnimationsProperty
# Animations
C#
public Reckfell.Collections.Array<GltfAnimation> Animations { get; set; }
BakeFpsProperty
# BakeFps
C#
public double BakeFps { get; set; }

The baking fps of the animation for either import or export.

BasePathProperty
# BasePath
C#
public string BasePath { get; set; }

The folder path associated with this glTF data. This is used to find other files the glTF file references, like images or binary buffers. This will be set during import when appending from a file, and will be set during export when writing to a file.

BufferViewsProperty
# BufferViews
C#
public Reckfell.Collections.Array<GltfBufferView> BufferViews { get; set; }
BuffersProperty
# Buffers
C#
public Reckfell.Collections.Array<byte[]> Buffers { get; set; }
CamerasProperty
# Cameras
C#
public Reckfell.Collections.Array<GltfCamera> Cameras { get; set; }
CopyrightProperty
# Copyright
C#
public string Copyright { get; set; }

The copyright string in the asset header of the glTF file. This is set during import if present and export if non-empty. See the glTF asset header documentation for more information.

CreateAnimationsProperty
# CreateAnimations
C#
public bool CreateAnimations { get; set; }
FileNameProperty
# FileName
C#
public string FileName { get; set; }

The file name associated with this glTF data. If it ends with .gltf, this is text-based glTF, otherwise this is binary GLB. This will be set during import when appending from a file, and will be set during export when writing to a file. If writing to a buffer, this will be an empty string.

GlbDataProperty
# GlbData
C#
public byte[] GlbData { get; set; }

The binary buffer attached to a .glb file.

HandleBinaryImageProperty
# HandleBinaryImage
C#
public int HandleBinaryImage { get; set; }
HandleBinaryImageModeProperty
# HandleBinaryImageMode
C#
public GltfState.HandleBinaryImageModeEnum HandleBinaryImageMode { get; set; }

When importing a glTF file with unimported raw binary images embedded inside of binary blob buffers, in data URIs, or separate files not imported by Reckfell, this controls how the images are handled. Images can be discarded, saved as separate files, or embedded in the scene lossily or losslessly. See GltfState.HandleBinaryImageModeEnum for options. This property does nothing for image files in the asset:// folder imported by Reckfell, as those are handled by Reckfell's image importer directly, and then the Reckfell scene generated from the glTF file will use the images as Reckfell imported them.

ImagesProperty
# Images
C#
public Reckfell.Collections.Array<Texture2D> Images { get; set; }
ImportAsSkeletonBonesProperty
# ImportAsSkeletonBones
C#
public bool ImportAsSkeletonBones { get; set; }

If true, forces all GLTFNodes in the document to be bones of a single Skeleton3D Reckfell node.

JsonProperty
# Json
C#
public Reckfell.Collections.Dictionary Json { get; set; }

The original raw JSON document corresponding to this GLTFState.

LightsProperty
# Lights
C#
public Reckfell.Collections.Array<GltfLight> Lights { get; set; }
MajorVersionProperty
# MajorVersion
C#
public int MajorVersion { get; set; }
MaterialsProperty
# Materials
C#
public Reckfell.Collections.Array<Material> Materials { get; set; }
MeshesProperty
# Meshes
C#
public Reckfell.Collections.Array<GltfMesh> Meshes { get; set; }
MinorVersionProperty
# MinorVersion
C#
public int MinorVersion { get; set; }
NodesProperty
# Nodes
C#
public Reckfell.Collections.Array<GltfNode> Nodes { get; set; }
RootNodesProperty
# RootNodes
C#
public int[] RootNodes { get; set; }

The root nodes of the glTF file. Typically, a glTF file will only have one scene, and therefore one root node. However, a glTF file may have multiple scenes and therefore multiple root nodes, which will be generated as siblings of each other and as children of the root node of the generated Reckfell scene.

SceneNameProperty
# SceneName
C#
public string SceneName { get; set; }

The name of the scene. When importing, if not specified, this will be the file name. When exporting, if specified, the scene name will be saved to the glTF file.

SkeletonsProperty
# Skeletons
C#
public Reckfell.Collections.Array<GltfSkeleton> Skeletons { get; set; }
SkinsProperty
# Skins
C#
public Reckfell.Collections.Array<GltfSkin> Skins { get; set; }
TextureSamplersProperty
# TextureSamplers
C#
public Reckfell.Collections.Array<GltfTextureSampler> TextureSamplers { get; set; }
TexturesProperty
# Textures
C#
public Reckfell.Collections.Array<GltfTexture> Textures { get; set; }
UniqueAnimationNamesProperty
# UniqueAnimationNames
C#
public Reckfell.Collections.Array<string> UniqueAnimationNames { get; set; }
UniqueNamesProperty
# UniqueNames
C#
public Reckfell.Collections.Array<string> UniqueNames { get; set; }
UseNamedSkinBindsProperty
# UseNamedSkinBinds
C#
public bool UseNamedSkinBinds { get; set; }

Methods77

AddUsedExtensionvoid
# AddUsedExtension
C#
public void AddUsedExtension(string extensionName, bool required);

Appends an extension to the list of extensions used by this glTF file during serialization. If required is true, the extension will also be added to the list of required extensions. Do not run this in GltfDocumentExtension._ExportPost, as that stage is too late to add extensions. The final list is sorted alphabetically.

Parameters
NameTypeDefault
extensionNamestring—
requiredbool—
AppendDataToBuffers2 overloads
# AppendDataToBuffers · 1/2
C#
public int AppendDataToBuffers(byte[] data, bool deduplication);

Appends the given byte array data to the buffers and creates a GltfBufferView for it. The index of the destination GltfBufferView is returned. If deduplication is true, the buffers are first searched for duplicate data, otherwise new bytes are always appended.

Parameters
NameTypeDefault
databyte[]—
deduplicationbool—
Returns int
# AppendDataToBuffers · 2/2
C#
public int AppendDataToBuffers(ReadOnlySpan<byte> data, bool deduplication);

Appends the given byte array data to the buffers and creates a GltfBufferView for it. The index of the destination GltfBufferView is returned. If deduplication is true, the buffers are first searched for duplicate data, otherwise new bytes are always appended.

Parameters
NameTypeDefault
dataReadOnlySpan<byte>—
deduplicationbool—
Returns int
AppendGltfNodeint
# AppendGltfNode
C#
public int AppendGltfNode(GltfNode gltfNode, Entity reckfellSceneNode, int parentNodeIndex);

Appends the given GltfNode to the state, and returns its new index. This can be used to export one Reckfell node as multiple glTF nodes, or inject new glTF nodes at import time. On import, this must be called before GltfDocumentExtension._GenerateSceneNode finishes for the parent node. On export, this must be called before GltfDocumentExtension._ExportNode runs for the parent node. The reckfell_scene_node parameter is the Reckfell scene node that corresponds to this glTF node. This is highly recommended to be set to a valid node, but may be null if there is no corresponding Reckfell scene node. One Reckfell scene node may be used for multiple glTF nodes, so if exporting multiple glTF nodes for one Reckfell scene node, use the same Reckfell scene node for each. The parent_node_index parameter is the index of the parent GltfNode in the state. If -1, the node will be a root node, otherwise the new node will be added to the parent's list of children. The index will also be written to the GltfNode.Parent property of the new node.

Parameters
NameTypeDefault
gltfNodeGltfNode—
reckfellSceneNodeEntity—
parentNodeIndexint—
Returns int
GetAccessorsReckfell.Collections.Array<GltfAccessor>
# GetAccessors
C#
public Reckfell.Collections.Array<GltfAccessor> GetAccessors();
Returns Reckfell.Collections.Array<GltfAccessor>
GetAdditionalDataVariant
# GetAdditionalData
C#
public Variant GetAdditionalData(StringName extensionName);

Gets additional arbitrary data in this GltfState instance. This can be used to keep per-file state data in GltfDocumentExtension classes, which is important because they are stateless. The argument should be the GltfDocumentExtension name (does not have to match the extension name in the glTF file), and the return value can be anything you set. If nothing was set, the return value is null.

Parameters
NameTypeDefault
extensionNameStringName—
Returns Variant
GetAnimationPlayerAnimationPlayer
# GetAnimationPlayer
C#
public AnimationPlayer GetAnimationPlayer(int animPlayerIndex);

Returns the AnimationPlayer node with the given index. These nodes are only used during the export process when converting Reckfell AnimationPlayer nodes to glTF animations.

Parameters
NameTypeDefault
animPlayerIndexint—
Returns AnimationPlayer
GetAnimationPlayersCountint
# GetAnimationPlayersCount
C#
public int GetAnimationPlayersCount(int animPlayerIndex);

Returns the number of AnimationPlayer nodes in this GltfState. These nodes are only used during the export process when converting Reckfell AnimationPlayer nodes to glTF animations.

Parameters
NameTypeDefault
animPlayerIndexint—
Returns int
GetAnimationsReckfell.Collections.Array<GltfAnimation>
# GetAnimations
C#
public Reckfell.Collections.Array<GltfAnimation> GetAnimations();

Returns an array of all GltfAnimations in the glTF file. When importing, these will be generated as animations in an AnimationPlayer node. When exporting, these will be generated from Reckfell AnimationPlayer nodes.

Returns Reckfell.Collections.Array<GltfAnimation>
GetBakeFpsdouble
# GetBakeFps
C#
public double GetBakeFps();
Returns double
GetBasePathstring
# GetBasePath
C#
public string GetBasePath();
Returns string
GetBufferViewsReckfell.Collections.Array<GltfBufferView>
# GetBufferViews
C#
public Reckfell.Collections.Array<GltfBufferView> GetBufferViews();
Returns Reckfell.Collections.Array<GltfBufferView>
GetBuffersReckfell.Collections.Array<byte[]>
# GetBuffers
C#
public Reckfell.Collections.Array<byte[]> GetBuffers();
Returns Reckfell.Collections.Array<byte[]>
GetCamerasReckfell.Collections.Array<GltfCamera>
# GetCameras
C#
public Reckfell.Collections.Array<GltfCamera> GetCameras();

Returns an array of all GltfCameras in the glTF file. These are the cameras that the GltfNode.Camera index refers to.

Returns Reckfell.Collections.Array<GltfCamera>
GetCopyrightstring
# GetCopyright
C#
public string GetCopyright();
Returns string
GetCreateAnimationsbool
# GetCreateAnimations
C#
public bool GetCreateAnimations();
Returns bool
GetDiscardMeshesAndMaterialsbool
# GetDiscardMeshesAndMaterials
C#
public bool GetDiscardMeshesAndMaterials();
Returns bool
GetEntityIndexint
# GetEntityIndex
C#
public int GetEntityIndex(Entity sceneNode);

Returns the index of the GltfNode corresponding to this Reckfell scene node. This is the inverse of GltfState.GetSceneNode. Useful during the export process. Note: Not every Reckfell scene node will have a corresponding GltfNode, and not every GltfNode will have a scene node generated. If there is no GltfNode index for this scene node, -1 is returned.

Parameters
NameTypeDefault
sceneNodeEntity—
Returns int
GetExtractPathstring
# GetExtractPath
C#
public string GetExtractPath();
Returns string
GetExtractPrefixstring
# GetExtractPrefix
C#
public string GetExtractPrefix();
Returns string
GetFileNamestring
# GetFileName
C#
public string GetFileName();
Returns string
GetGlbDatabyte[]
# GetGlbData
C#
public byte[] GetGlbData();
Returns byte[]
GetHandleBinaryImageint · Deprecated
# GetHandleBinaryImage
C#
public int GetHandleBinaryImage();

Deprecated untyped alias for GltfState.HandleBinaryImageMode. When importing a glTF file with unimported raw binary images embedded inside of binary blob buffers, in data URIs, or separate files not imported by Reckfell, this controls how the images are handled.

Returns int
GetHandleBinaryImageModeGltfState.HandleBinaryImageModeEnum
# GetHandleBinaryImageMode
C#
public GltfState.HandleBinaryImageModeEnum GetHandleBinaryImageMode();
Returns GltfState.HandleBinaryImageModeEnum
GetImagesReckfell.Collections.Array<Texture2D>
# GetImages
C#
public Reckfell.Collections.Array<Texture2D> GetImages();

Gets the images of the glTF file as an array of Texture2Ds. These are the images that the GltfTexture.SrcImage index refers to.

Returns Reckfell.Collections.Array<Texture2D>
GetImportAsSkeletonBonesbool
# GetImportAsSkeletonBones
C#
public bool GetImportAsSkeletonBones();
Returns bool
GetJsonReckfell.Collections.Dictionary
# GetJson
C#
public Reckfell.Collections.Dictionary GetJson();
Returns Reckfell.Collections.Dictionary
GetLightsReckfell.Collections.Array<GltfLight>
# GetLights
C#
public Reckfell.Collections.Array<GltfLight> GetLights();

Returns an array of all GltfLights in the glTF file. These are the lights that the GltfNode.Light index refers to.

Returns Reckfell.Collections.Array<GltfLight>
GetMajorVersionint
# GetMajorVersion
C#
public int GetMajorVersion();
Returns int
GetMaterialsReckfell.Collections.Array<Material>
# GetMaterials
C#
public Reckfell.Collections.Array<Material> GetMaterials();
Returns Reckfell.Collections.Array<Material>
GetMeshesReckfell.Collections.Array<GltfMesh>
# GetMeshes
C#
public Reckfell.Collections.Array<GltfMesh> GetMeshes();

Returns an array of all GltfMeshes in the glTF file. These are the meshes that the GltfNode.Mesh index refers to.

Returns Reckfell.Collections.Array<GltfMesh>
GetMinorVersionint
# GetMinorVersion
C#
public int GetMinorVersion();
Returns int
GetNodesReckfell.Collections.Array<GltfNode>
# GetNodes
C#
public Reckfell.Collections.Array<GltfNode> GetNodes();

Returns an array of all GltfNodes in the glTF file. These are the nodes that GltfNode.Children and GltfState.RootNodes refer to. This includes nodes that may not be generated in the Reckfell scene, or nodes that may generate multiple Reckfell scene nodes.

Returns Reckfell.Collections.Array<GltfNode>
GetRootNodesint[]
# GetRootNodes
C#
public int[] GetRootNodes();
Returns int[]
GetSceneNamestring
# GetSceneName
C#
public string GetSceneName();
Returns string
GetSceneNodeEntity
# GetSceneNode
C#
public Entity GetSceneNode(int gltfNodeIndex);

Returns the Reckfell scene node that corresponds to the same index as the GltfNode it was generated from. This is the inverse of GltfState.GetEntityIndex. Useful during the import process. Note: Not every GltfNode will have a scene node generated, and not every generated scene node will have a corresponding GltfNode. If there is no scene node for this GltfNode index, null is returned.

Parameters
NameTypeDefault
gltfNodeIndexint—
Returns Entity
GetSkeletonsReckfell.Collections.Array<GltfSkeleton>
# GetSkeletons
C#
public Reckfell.Collections.Array<GltfSkeleton> GetSkeletons();

Returns an array of all GltfSkeletons in the glTF file. These are the skeletons that the GltfNode.Skeleton index refers to.

Returns Reckfell.Collections.Array<GltfSkeleton>
GetSkinsReckfell.Collections.Array<GltfSkin>
# GetSkins
C#
public Reckfell.Collections.Array<GltfSkin> GetSkins();

Returns an array of all GltfSkins in the glTF file. These are the skins that the GltfNode.Skin index refers to.

Returns Reckfell.Collections.Array<GltfSkin>
GetTextureSamplersReckfell.Collections.Array<GltfTextureSampler>
# GetTextureSamplers
C#
public Reckfell.Collections.Array<GltfTextureSampler> GetTextureSamplers();

Retrieves the array of texture samplers that are used by the textures contained in the glTF.

Returns Reckfell.Collections.Array<GltfTextureSampler>
GetTexturesReckfell.Collections.Array<GltfTexture>
# GetTextures
C#
public Reckfell.Collections.Array<GltfTexture> GetTextures();
Returns Reckfell.Collections.Array<GltfTexture>
GetUniqueAnimationNamesReckfell.Collections.Array<string>
# GetUniqueAnimationNames
C#
public Reckfell.Collections.Array<string> GetUniqueAnimationNames();

Returns an array of unique animation names. This is only used during the import process.

Returns Reckfell.Collections.Array<string>
GetUniqueNamesReckfell.Collections.Array<string>
# GetUniqueNames
C#
public Reckfell.Collections.Array<string> GetUniqueNames();

Returns an array of unique node names. This is used in both the import process and export process.

Returns Reckfell.Collections.Array<string>
GetUseNamedSkinBindsbool
# GetUseNamedSkinBinds
C#
public bool GetUseNamedSkinBinds();
Returns bool
SetAccessorsvoid
# SetAccessors
C#
public void SetAccessors(Reckfell.Collections.Array<GltfAccessor> accessors);
Parameters
NameTypeDefault
accessorsReckfell.Collections.Array<GltfAccessor>—
SetAdditionalDatavoid
# SetAdditionalData
C#
public void SetAdditionalData(StringName extensionName, Variant additionalData);

Sets additional arbitrary data in this GltfState instance. This can be used to keep per-file state data in GltfDocumentExtension classes, which is important because they are stateless. The first argument should be the GltfDocumentExtension name (does not have to match the extension name in the glTF file), and the second argument can be anything you want.

Parameters
NameTypeDefault
extensionNameStringName—
additionalDataVariant—
SetAnimationsvoid
# SetAnimations
C#
public void SetAnimations(Reckfell.Collections.Array<GltfAnimation> animations);

Sets the GltfAnimations in the state. When importing, these will be generated as animations in an AnimationPlayer node. When exporting, these will be generated from Reckfell AnimationPlayer nodes.

Parameters
NameTypeDefault
animationsReckfell.Collections.Array<GltfAnimation>—
SetBakeFpsvoid
# SetBakeFps
C#
public void SetBakeFps(double value);
Parameters
NameTypeDefault
valuedouble—
SetBasePathvoid
# SetBasePath
C#
public void SetBasePath(string basePath);
Parameters
NameTypeDefault
basePathstring—
SetBufferViewsvoid
# SetBufferViews
C#
public void SetBufferViews(Reckfell.Collections.Array<GltfBufferView> bufferViews);
Parameters
NameTypeDefault
bufferViewsReckfell.Collections.Array<GltfBufferView>—
SetBuffersvoid
# SetBuffers
C#
public void SetBuffers(Reckfell.Collections.Array<byte[]> buffers);
Parameters
NameTypeDefault
buffersReckfell.Collections.Array<byte[]>—
SetCamerasvoid
# SetCameras
C#
public void SetCameras(Reckfell.Collections.Array<GltfCamera> cameras);

Sets the GltfCameras in the state. These are the cameras that the GltfNode.Camera index refers to.

Parameters
NameTypeDefault
camerasReckfell.Collections.Array<GltfCamera>—
SetCopyrightvoid
# SetCopyright
C#
public void SetCopyright(string copyright);
Parameters
NameTypeDefault
copyrightstring—
SetCreateAnimationsvoid
# SetCreateAnimations
C#
public void SetCreateAnimations(bool createAnimations);
Parameters
NameTypeDefault
createAnimationsbool—
SetFileNamevoid
# SetFileName
C#
public void SetFileName(string fileName);
Parameters
NameTypeDefault
fileNamestring—
SetGlbData2 overloads
# SetGlbData · 1/2
C#
public void SetGlbData(byte[] glbData);
Parameters
NameTypeDefault
glbDatabyte[]—
# SetGlbData · 2/2
C#
public void SetGlbData(ReadOnlySpan<byte> glbData);
Parameters
NameTypeDefault
glbDataReadOnlySpan<byte>—
SetHandleBinaryImagevoid · Deprecated
# SetHandleBinaryImage
C#
public void SetHandleBinaryImage(int method);

Deprecated untyped alias for GltfState.HandleBinaryImageMode. When importing a glTF file with unimported raw binary images embedded inside of binary blob buffers, in data URIs, or separate files not imported by Reckfell, this controls how the images are handled.

Parameters
NameTypeDefault
methodint—
SetHandleBinaryImageModevoid
# SetHandleBinaryImageMode
C#
public void SetHandleBinaryImageMode(GltfState.HandleBinaryImageModeEnum method);
Parameters
NameTypeDefault
methodGltfState.HandleBinaryImageModeEnum—
SetImagesvoid
# SetImages
C#
public void SetImages(Reckfell.Collections.Array<Texture2D> images);

Sets the images in the state stored as an array of Texture2Ds. This can be used during export. These are the images that the GltfTexture.SrcImage index refers to.

Parameters
NameTypeDefault
imagesReckfell.Collections.Array<Texture2D>—
SetImportAsSkeletonBonesvoid
# SetImportAsSkeletonBones
C#
public void SetImportAsSkeletonBones(bool importAsSkeletonBones);
Parameters
NameTypeDefault
importAsSkeletonBonesbool—
SetJsonvoid
# SetJson
C#
public void SetJson(Reckfell.Collections.Dictionary json);
Parameters
NameTypeDefault
jsonReckfell.Collections.Dictionary—
SetLightsvoid
# SetLights
C#
public void SetLights(Reckfell.Collections.Array<GltfLight> lights);

Sets the GltfLights in the state. These are the lights that the GltfNode.Light index refers to.

Parameters
NameTypeDefault
lightsReckfell.Collections.Array<GltfLight>—
SetMajorVersionvoid
# SetMajorVersion
C#
public void SetMajorVersion(int majorVersion);
Parameters
NameTypeDefault
majorVersionint—
SetMaterialsvoid
# SetMaterials
C#
public void SetMaterials(Reckfell.Collections.Array<Material> materials);
Parameters
NameTypeDefault
materialsReckfell.Collections.Array<Material>—
SetMeshesvoid
# SetMeshes
C#
public void SetMeshes(Reckfell.Collections.Array<GltfMesh> meshes);

Sets the GltfMeshes in the state. These are the meshes that the GltfNode.Mesh index refers to.

Parameters
NameTypeDefault
meshesReckfell.Collections.Array<GltfMesh>—
SetMinorVersionvoid
# SetMinorVersion
C#
public void SetMinorVersion(int minorVersion);
Parameters
NameTypeDefault
minorVersionint—
SetNodesvoid
# SetNodes
C#
public void SetNodes(Reckfell.Collections.Array<GltfNode> nodes);

Sets the GltfNodes in the state. These are the nodes that GltfNode.Children and GltfState.RootNodes refer to. Some of the nodes set here may not be generated in the Reckfell scene, or may generate multiple Reckfell scene nodes.

Parameters
NameTypeDefault
nodesReckfell.Collections.Array<GltfNode>—
SetRootNodes2 overloads
# SetRootNodes · 1/2
C#
public void SetRootNodes(int[] rootNodes);
Parameters
NameTypeDefault
rootNodesint[]—
# SetRootNodes · 2/2
C#
public void SetRootNodes(ReadOnlySpan<int> rootNodes);
Parameters
NameTypeDefault
rootNodesReadOnlySpan<int>—
SetSceneNamevoid
# SetSceneName
C#
public void SetSceneName(string sceneName);
Parameters
NameTypeDefault
sceneNamestring—
SetSkeletonsvoid
# SetSkeletons
C#
public void SetSkeletons(Reckfell.Collections.Array<GltfSkeleton> skeletons);

Sets the GltfSkeletons in the state. These are the skeletons that the GltfNode.Skeleton index refers to.

Parameters
NameTypeDefault
skeletonsReckfell.Collections.Array<GltfSkeleton>—
SetSkinsvoid
# SetSkins
C#
public void SetSkins(Reckfell.Collections.Array<GltfSkin> skins);

Sets the GltfSkins in the state. These are the skins that the GltfNode.Skin index refers to.

Parameters
NameTypeDefault
skinsReckfell.Collections.Array<GltfSkin>—
SetTextureSamplersvoid
# SetTextureSamplers
C#
public void SetTextureSamplers(Reckfell.Collections.Array<GltfTextureSampler> textureSamplers);

Sets the array of texture samplers that are used by the textures contained in the glTF.

Parameters
NameTypeDefault
textureSamplersReckfell.Collections.Array<GltfTextureSampler>—
SetTexturesvoid
# SetTextures
C#
public void SetTextures(Reckfell.Collections.Array<GltfTexture> textures);
Parameters
NameTypeDefault
texturesReckfell.Collections.Array<GltfTexture>—
SetUniqueAnimationNamesvoid
# SetUniqueAnimationNames
C#
public void SetUniqueAnimationNames(Reckfell.Collections.Array<string> uniqueAnimationNames);

Sets the unique animation names in the state. This is only used during the import process.

Parameters
NameTypeDefault
uniqueAnimationNamesReckfell.Collections.Array<string>—
SetUniqueNamesvoid
# SetUniqueNames
C#
public void SetUniqueNames(Reckfell.Collections.Array<string> uniqueNames);

Sets the unique node names in the state. This is used in both the import process and export process.

Parameters
NameTypeDefault
uniqueNamesReckfell.Collections.Array<string>—
SetUseNamedSkinBindsvoid
# SetUseNamedSkinBinds
C#
public void SetUseNamedSkinBinds(bool useNamedSkinBinds);
Parameters
NameTypeDefault
useNamedSkinBindsbool—

Fields and constants4

HandleBinaryDiscardTexturesField · Deprecated
# HandleBinaryDiscardTextures
C#
public const long HandleBinaryDiscardTextures = 0;

Discards all embedded textures and uses untextured materials.

HandleBinaryEmbedAsBasisuField · Deprecated
# HandleBinaryEmbedAsBasisu
C#
public const long HandleBinaryEmbedAsBasisu = 2;

Embeds textures VRAM compressed with Basis Universal into the generated scene.

HandleBinaryEmbedAsUncompressedField · Deprecated
# HandleBinaryEmbedAsUncompressed
C#
public const long HandleBinaryEmbedAsUncompressed = 3;

Embeds textures compressed losslessly into the generated scene, matching old behavior.

HandleBinaryExtractTexturesField · Deprecated
# HandleBinaryExtractTextures
C#
public const long HandleBinaryExtractTextures = 1;

Extracts embedded textures to be reimported and compressed. Editor only. Acts as uncompressed at runtime.

GltfState.HandleBinaryImageModeEnum

ValueDescription
DiscardTextures = 0

When importing a glTF file with embedded binary images, discards all images and uses untextured materials in their place. Images stored as separate files in the asset:// folder are not affected by this; those will be used as Reckfell imported them.

EmbedAsBasisu = 2

When importing a glTF file with embedded binary images, embeds textures VRAM compressed with Basis Universal into the generated scene. Images stored as separate files in the asset:// folder are not affected by this; those will be used as Reckfell imported them.

EmbedAsUncompressed = 3

When importing a glTF file with embedded binary images, embeds textures compressed losslessly into the generated scene. Images stored as separate files in the asset:// folder are not affected by this; those will be used as Reckfell imported them.

ExtractTextures = 1

When importing a glTF file with embedded binary images, extracts them and saves them to their own files. This allows the image to be imported by Reckfell's image importer, which can then have their import options customized by the user, including optionally compressing the image to VRAM texture formats. This will save the images' bytes exactly as-is, without recompression. For image formats supplied by glTF extensions, the file will have a filename ending with the file extension supplied by GltfDocumentExtension._GetImageFileExtension of the extension class. Note: This option is editor-only. At runtime, this acts the same as GltfState.HandleBinaryImageModeEnum.EmbedAsUncompressed.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.