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
A user annotation implemented in the GDScript language.
5
+
</brief_description>
6
+
<description>
7
+
A user annotation implemented in the GDScript language. User annotations are metadata that can be associated with a GDScript.
8
+
You can create a new GDScriptAnnotation by extending GDScriptAnnotation's subclasses, such as [GDScriptVariableAnnotation] and [GDScriptFunctionAnnotation].
9
+
User annotations must have a class name, cannot be a nested class, and must define the constructor [code]_init[/code], which defines the annotation's parameters.
10
+
</description>
11
+
<tutorials>
12
+
</tutorials>
13
+
<methods>
14
+
<methodname="get_name"qualifiers="const">
15
+
<returntype="StringName" />
16
+
<description>
17
+
Returns the annotation's name, which is equal to the class name.
The annotation's current error message. Setting this to a non-empty value when the annotation is being compiled will cause the GDScript parser to emit an error.
Override to access the targeted function's information. This can be used for validation, for example requiring the function to have a specific signature.
25
+
- [param name] is the function's name;
26
+
- [param parameter_names] is an array containing every parameter's name.
27
+
- [param parameter_type_names] is an array containing every parameter's type name.
28
+
- [param parameter_builtin_types] is an array containing every parameter's type, as an [int] (see [enum Variant.Type]);
29
+
- [param return_type_name] is the return type's type name;
30
+
- [param return_builtin_type] is the return type, as an [int] (see [enum Variant.Type]);
31
+
- [param default_arguments] is an array containing default arguments for the function;
32
+
- [param is_static] is whether the function is static or not;
33
+
- [param is_coroutine] is whether the function is a coroutine or not.
A user annotation that can only target variables. By overriding [method _is_export_annotation], this annotation can also act as an export annotation like [annotation @GDScript.@export_custom].
0 commit comments