Registering your code
Register your script classes and the members Godot needs to use by adding annotations.
The guide uses the default registration settings. @Script exposes a class, @Export exposes a property in the Inspector, and @Register exposes a function to Godot.
A Godot subclass uses @Script. @Export makes a property editable in the Inspector, and @Register makes an ordinary function callable by Godot, another script, or the editor.
For example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | |