system
1
|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
Wurzelpilz |
extends Node2D
enum Check {
right,
left,
down,
up
}
var my_enum : Check
that does not work: the identifier Check is not a valid type (not a script, or class)
system
2
|
|
|
|
Reply From: |
sash-rc |
Enum in GDScrpt is a kind of controversial right now and can’t be used as type, it works like namespaced const
enum Check {
right,
left,
down,
up
}
var my_enum : int = Check.right
But they’re planning to improve it in 4.0