system
1
|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
sirdorius |
How to use the export with type hints for the editor in Godot 4?
This is the old syntax for Godot 3:
export(int, LAYERS_3D_RENDER) var layers_3d_render
What is the equivalent for the new version?
system
2
|
|
|
|
Reply From: |
RandallCurtis |
In Godot 4, exports use the “@” annotation syntax. For 3D render layers the annotation is @export_flags_3d_render
. You can view the full list and examples on the ‘latest’ docs version at @GDScript — Godot Engine (latest) documentation in English. The exports tutorial has been updated as well: GDScript exported properties — Godot Engine (latest) documentation in English
Thanks, this worked
sirdorius | 2022-11-05 18:56