You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Display toasts when using push_error() or push_warning() in a script
This only applies to scripts running within the editor itself, such as
editor plugins and `@tool` scripts.
Text-based logging will also display those errors as userspace errors,
as opposed to internal engine errors.
Copy file name to clipboardexpand all lines: doc/classes/@GlobalScope.xml
+2-2
Original file line number
Diff line number
Diff line change
@@ -908,7 +908,7 @@
908
908
</method>
909
909
<methodname="push_error"qualifiers="vararg">
910
910
<description>
911
-
Pushes an error message to Godot's built-in debugger and to the OS terminal.
911
+
Pushes an error message to Godot's built-in debugger and to the OS terminal. When used in an [EditorPlugin] or [code]@tool[/code] script, this also displays an error toast in the editor.
912
912
[codeblocks]
913
913
[gdscript]
914
914
push_error("test error") # Prints "test error" to debugger and terminal as error call
@@ -922,7 +922,7 @@
922
922
</method>
923
923
<methodname="push_warning"qualifiers="vararg">
924
924
<description>
925
-
Pushes a warning message to Godot's built-in debugger and to the OS terminal.
925
+
Pushes a warning message to Godot's built-in debugger and to the OS terminal. When used in an [EditorPlugin] or [code]@tool[/code] script, this also displays a warning toast in the editor.
926
926
[codeblocks]
927
927
[gdscript]
928
928
push_warning("test warning") # Prints "test warning" to debugger and terminal as warning call
0 commit comments