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
The [param callback] must take a single argument of type [StringName] which will contain the type name of the selected object or be empty if no item is selected.
295
+
The [param callback] must take a single argument of type [String], which will contain the type name of the selected object (or the script path of the type, if the type is created from a script), or be an empty string if no item is selected.
296
296
The [param base_type] specifies the base type of objects to display. For example, if you set this to "Resource", all types derived from [Resource] will display in the create dialog.
297
297
The [param current_type] will be passed in the search box of the create dialog, and the specified type can be immediately selected when the dialog pops up. If the [param current_type] is not derived from [param base_type], there will be no result of the type in the dialog.
298
298
The [param dialog_title] allows you to define a custom title for the dialog. This is useful if you want to accurately hint the usage of the dialog. If the [param dialog_title] is an empty string, the dialog will use "Create New 'Base Type'" as the default title.
Copy file name to clipboardExpand all lines: doc/classes/ProjectSettings.xml
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -509,12 +509,18 @@
509
509
Specifies the maximum number of log files allowed (used for rotation). Set to [code]1[/code] to disable log file rotation.
510
510
If the [code]--log-file <file>[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url] is used, log rotation is always disabled.
When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a script's private member (property, method, or signal) is accessed from an external script that does not inherit the original script. A member is considered private when its name begins with an underscore ([code]_[/code]).
When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when an [code]assert[/code] call always evaluates to [code]false[/code].
When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when an [code]assert[/code] call always evaluates to [code]true[/code].
When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a script's private method is called from an external script that does not inherit the original script. A method is considered private when its name begins with an underscore ([code]_[/code]).
When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a local variable captured by a lambda is reassigned, since this does not modify the outer local variable.
returnvformat(R"*(The default value uses "%s" which won't return nodes in the scene tree before "_ready()" is called. Use the "@onready" annotation to solve this.)*", symbols[0]);
163
163
case ONREADY_WITH_EXPORT:
164
164
returnR"("@onready" will set the default value after "@export" takes effect and will override it.)";
165
+
case ACCESS_PRIVATE_MEMBER:
166
+
CHECK_SYMBOLS(1);
167
+
returnvformat(R"(The member "%s" is private. It should not be accessed from an external script.)", symbols[0]);
168
+
case CALL_PRIVATE_METHOD:
169
+
CHECK_SYMBOLS(1);
170
+
returnvformat(R"*(The method "%s()" is private. It should not be called from an external script.)*", symbols[0]);
165
171
#ifndef DISABLE_DEPRECATED
166
172
// Never produced. These warnings migrated from 3.x by mistake.
167
173
case PROPERTY_USED_AS_FUNCTION: // There is already an error.
Copy file name to clipboardExpand all lines: modules/gdscript/gdscript_warning.h
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,8 @@ class GDScriptWarning {
89
89
NATIVE_METHOD_OVERRIDE, // The script method overrides a native one, this may not work as intended.
90
90
GET_NODE_DEFAULT_WITHOUT_ONREADY, // A class variable uses `get_node()` (or the `$` notation) as its default value, but does not use the @onready annotation.
91
91
ONREADY_WITH_EXPORT, // The `@onready` annotation will set the value after `@export` which is likely not intended.
92
+
ACCESS_PRIVATE_MEMBER, // Accessing a private member from external places. E.g. accessing an `_`-prefixed member from other classes that are not derived from the class where the member is defined.
93
+
CALL_PRIVATE_METHOD, // Calling a private method from external places. E.g. calling an `_`-prefixed method from other classes that are not derived from the class where the method is defined.
92
94
#ifndef DISABLE_DEPRECATED
93
95
PROPERTY_USED_AS_FUNCTION, // Function not found, but there's a property with the same name.
94
96
CONSTANT_USED_AS_FUNCTION, // Function not found, but there's a constant with the same name.
@@ -146,6 +148,8 @@ class GDScriptWarning {
146
148
ERROR, // NATIVE_METHOD_OVERRIDE // May not work as expected.
147
149
ERROR, // GET_NODE_DEFAULT_WITHOUT_ONREADY // May not work as expected.
148
150
ERROR, // ONREADY_WITH_EXPORT // May not work as expected.
0 commit comments