Function return Enum value

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By FinFan

Hello gyus!
In godot functions cant return Enum values?

for example:

enum EMoveType {
func get_type() -> enum EMoveType :
	return type

How you set the enums from a classes? you dont use the incapsulation?

:bust_in_silhouette: Reply From: SIsilicon

Usually, enumerators are just constant integers with names. You can return enumerators, but they’ll be returned as integers.

func get_type() -> int:
    return type