Skip to content

Commit 3141668

Browse files
authored
Merge pull request #11819 from guacboy/patch-1
doc: Clarify that @tool script changes do not auto-mark scene as unsaved
1 parent ee2bd1b commit 3141668

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tutorials/plugins/running_code_in_the_editor.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,14 @@ If you are using :ref:`EditorScript <class_EditorScript>`:
777777
node.Owner = GetScene();
778778
}
779779

780+
.. note::
781+
782+
Changes made by tool scripts and EditorScript (such as adding nodes or modifying properties)
783+
do **not** automatically mark the scene as unsaved. To show the asterisk ``(*)``
784+
and prevent accidental data loss, call
785+
:ref:`EditorInterface.mark_scene_as_unsaved() <class_EditorInterface_method_mark_scene_as_unsaved>`
786+
after modifications, or use :ref:`EditorUndoRedoManager <class_EditorUndoRedoManager>` for undo support.
787+
780788
.. warning::
781789

782790
Using ``@tool`` improperly can yield many errors. It is advised to first

0 commit comments

Comments
 (0)