godot.d.type

Templates for working with Godot's type system

Members

Aliases

DTypeOf
alias DTypeOf(C t) = DTypeOf!(GodotType(t))
Undocumented in source.
GodotType
alias GodotType = SumType!(TypeCategories)

A specific Godot type in one of these type categories: * A built-in class derived from GodotObject * A Script extending GodotObject (either in D or another Godot scripting language) * A Godot core type from the godot.core modules or a primitive (represented as a Variant.Type)

TypeCategories
alias TypeCategories = AliasSeq!(Variant.Type, BuiltInClass, Ref!Script)

Functions

get
T get(GodotType type, T defaultValue)
isCategory
bool isCategory(GodotType type)

Is type in type category T?

Structs

BuiltInClass
struct BuiltInClass

Templates

DTypeOf
template DTypeOf(GodotType t)

D type of a compile-time GodotType

GodotTypeOf
template GodotTypeOf(T)

FIXME: GodotType can't currently work with String or Ref!Script at compile time, when they're not yet loaded from Godot. That also breaks DTypeOf GodotType of a compile-time D type. If T is indirectly compatible with Godot, this returns the Godot type T would be converted to when passed to Godot.

Meta