- Edited
I am testing with Godot engine and C ++ but I cannot use enums.
I mean the enumeration declares it in the following way.
public:
enum EnumerationType
{
UNIT_NEUTRAL,
UNIT_ENEMY,
UNIT_ALLY
};
Enum data type in variable.
MyClass::EnumerationType variableTest ;
The error comes out.
error C2440: 'return': unable to convert from 'godot :: Variant' to 'T'
with
[
T = godot :: MyClass :: EnumerationType
]
Does anyone have any small example projects where they use enums with Godot Engine C ++ and GDnative?
Does anything need to be done to make the C ++ enum data types work inside godot?
Could GDscript's enum datatype be used in C ++?