- DType
alias DType = AliasSeq!(typeof(null), bool, long, double, String, Vector2, Rect2, Vector3, Transform2D, Plane, Quat, AABB, Basis, Transform, Color, NodePath, RID, GodotObject, Dictionary, Array, PoolByteArray, PoolIntArray, PoolRealArray, PoolStringArray, PoolVector2Array, PoolVector3Array, PoolColorArray)
D type that this Variant implementation uses
- InternalType
alias InternalType = AliasSeq!(typeof(null), godot_bool, long, double, godot_string, godot_vector2, godot_rect2, godot_vector3, godot_transform2d, godot_plane, godot_quat, godot_aabb, godot_basis, godot_transform, godot_color, godot_node_path, godot_rid, godot_object, godot_dictionary, godot_array, godot_pool_byte_array, godot_pool_int_array, godot_pool_real_array, godot_pool_string_array, godot_pool_vector2_array, godot_pool_vector3_array, godot_pool_color_array)
GDNative type that gets passed to the C functions
- conversionFromGodotType
alias conversionFromGodotType(T) = Unqual!(Parameters!(conversionFromGodot!T)[0])
Undocumented in source.
- conversionToGodotType
alias conversionToGodotType(T) = Unqual!(ReturnType!(conversionToGodot!T))
Undocumented in source.
- as
T as()
- as
T as()
- as
GodotType as()
- as
R as()
- as
inout(T) as()
Undocumented in source. Be warned that the author may not have intended to support it.
- booleanize
bool booleanize()
Undocumented in source. Be warned that the author may not have intended to support it.
- exactType
GodotType exactType()
The exact GodotType of the value stored in this Variant.
- isType
bool isType(GodotType type)
Is this Variant of the specified type or of a subclass of type?
- opAssign
void opAssign(T input)
Undocumented in source. Be warned that the author may not have intended to support it.
- opAssign
void opAssign(T nil)
Undocumented in source. Be warned that the author may not have intended to support it.
- opAssign
void opAssign(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
- opCmp
int opCmp(Variant other)
Undocumented in source. Be warned that the author may not have intended to support it.
- opEquals
bool opEquals(Variant other)
Undocumented in source. Be warned that the author may not have intended to support it.
- toString
auto toString()
Undocumented in source. Be warned that the author may not have intended to support it.
- type
Type type()
Undocumented in source. Be warned that the author may not have intended to support it.
Godot's tagged union type.
Primitives, Godot core types, and GodotObject-derived classes can be stored in a Variant. Other user-defined D types can be made compatible with Variant by defining to!CustomType(Variant) and to!Variant(CustomType) functions.
Properties and method arguments/returns are passed between Godot and D through Variant, so these must use Variant-compatible types.