Skip to content

GDScript

Stable

  • Generator status: full codegen supported.
  • Other features: additional generator features are already available here compared with some newer targets.

Top-level CCL enums are generated as GDScript files with a class_name that matches the CCL enum name. To avoid having the inner GDScript enum conflict with or duplicate that class_name, the generated enum declaration appends Enum to the CCL enum name.

enum SkinType : uint8 {
Basic = 0;
Texture = 1;
}
class_name SkinType
enum SkinTypeEnum {
BASIC = 0,
TEXTURE = 1,
}

Enums declared inside a model do not need that suffix because they are already scoped inside the generated model class. In that case, the enum keeps its CCL name.

model UserInfo {
enum UserType {
Unknown,
Player,
}
Type: UserType;
}
class_name UserInfo
enum UserType {
UNKNOWN = 0,
PLAYER = 1,
}
var type: UserType

If you want the broadest stable feature set outside Go, GDScript is one of the strongest targets right now.