GLTFDocument

Inherits: Resource < Reference < Object

Description

Note: This class is only compiled in editor builds. Run-time glTF loading and saving is not available in exported projects. References to GLTFDocument within a script will cause an error in an exported project.

Methods

void

register_gltf_document_extension ( GLTFDocumentExtension extension, bool first_priority=false )

void

unregister_all_gltf_document_extensions ( )

void

unregister_gltf_document_extension ( GLTFDocumentExtension extension )


Method Descriptions

void register_gltf_document_extension ( GLTFDocumentExtension extension, bool first_priority=false )

Registers the given GLTFDocumentExtension instance with GLTFDocument. If first_priority is true, this extension will be run first. Otherwise, it will be run last.

Note: Like GLTFDocument itself, all GLTFDocumentExtension classes must be stateless in order to function properly. If you need to store data, use the set_additional_data and get_additional_data methods in GLTFState or GLTFNode.


void unregister_all_gltf_document_extensions ( )

Unregisters all GLTFDocumentExtension instances.


void unregister_gltf_document_extension ( GLTFDocumentExtension extension )

Unregisters the given GLTFDocumentExtension instance.