Jelajahi Sumber

Add warning to reflect behavior with tool nodes (#2577)

In response to this issue: https://github.com/godotengine/godot/issues/30104
Cameron Reikes 6 tahun lalu
induk
melakukan
5402f28f59
1 mengubah file dengan 5 tambahan dan 0 penghapusan
  1. 5 0
      getting_started/scripting/gdscript/gdscript_basics.rst

+ 5 - 0
getting_started/scripting/gdscript/gdscript_basics.rst

@@ -1443,6 +1443,11 @@ placed at the top of the file:
     func _ready():
     func _ready():
         print("Hello")
         print("Hello")
 
 
+.. warning:: Be cautious when freeing nodes with `queue_free()` or `free()`
+             in a tool script (especially the script's owner itself). As tool
+             scripts run their code in the editor, misusing them may lead to
+             crashing the editor.
+
 Memory management
 Memory management
 ~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~