- DType
alias DType = AliasSeq!(typeof(null), bool, long, double, String, Vector2, Vector2i, Rect2, Rect2i, Vector3, Vector3i, Transform2D, Vector4, Vector4i, Plane, Quaternion, AABB, Basis, Transform3D, Projection, Color, StringName, NodePath, RID, GodotObject, GodotCallable, GodotSignal, Dictionary, Array, PackedByteArray, PackedInt32Array, PackedInt64Array, PackedFloat32Array, PackedFloat64Array, PackedStringArray, PackedVector2Array, PackedVector3Array, PackedColorArray)
D type that this Variant implementation uses
- InternalType
alias InternalType = AliasSeq!(typeof(null), godot_bool, int, double, godot_string, godot_vector2, godot_vector2i, godot_rect2, godot_rect2i, godot_vector3, godot_vector3i, godot_transform2d, godot_vector4, godot_vector4i, godot_plane, godot_quaternion, godot_aabb, godot_basis, godot_transform3d, godot_projection, godot_color, godot_string, godot_node_path, godot_rid, godot_object, godot_callable, godot_signal, godot_dictionary, godot_array, godot_packed_byte_array, godot_packed_int32_array, godot_packed_int64_array, godot_packed_float32_array, godot_packed_float64_array, godot_packed_string_array, godot_packed_vector2_array, godot_packed_vector3_array, godot_packed_color_array)
GDExtension type that gets passed to the C functions
- Type
alias Type = VariantType
Undocumented in source.
- 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
T as()
Undocumented in source. Be warned that the author may not have intended to support it.
- 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(void* 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.