Replies: 3 comments 8 replies
-
Have you tried static for the visibility part? |
Beta Was this translation helpful? Give feedback.
-
If you really need
The way I see it the issue is that calling |
Beta Was this translation helpful? Give feedback.
-
I was trying to create an enum whose variants are unique references instantiated from the enum type itself. Variants share similiar methods and virtual properties. E.g., instead of:
I'd do:
There are currently two problems with that:
const
const
definitions are only visible within the class itself.So I need to be able to both export the
const
definitions so they're visible to the public and assign non-constant expressions to theseconst
s. Are there existing proposals for this?static var
, finally introduced in Godot 4.1, instead ofconst
works well:You can use it like:
Beta Was this translation helpful? Give feedback.
All reactions