File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,20 @@ Example of loading a glTF scene and appending its root node to the scene:
198198 # `GLTFDocument.generate_buffer()` is also available for saving to memory.
199199 gltf_document_save.write_to_filesystem(gltf_state_save, path)
200200
201+ .. note ::
202+
203+ When loading a glTF scene, a *base path * must be set so that external
204+ resources like textures can be loaded correctly. When loading from a file,
205+ the base path is automatically set to the folder containing the file. When
206+ loading from a buffer, this base path must be manually set as there is no
207+ way for Godot to infer this path.
208+
209+ To set the base path, set
210+ :ref: `GLTFState.base_path <class_GLTFState_property_base_path >` on your
211+ GLTFState instance *before * calling
212+ :ref: `GLTFDocument.append_from_buffer <class_GLTFDocument_method_append_from_buffer >`
213+ or :ref: `GLTFDocument.append_from_file <class_GLTFDocument_method_append_from_file >`.
214+
201215.. _doc_runtime_file_loading_and_saving_fonts :
202216
203217Fonts
You can’t perform that action at this time.
0 commit comments