Variant
Tagged engine value for dynamic API boundaries.
Variant holds one value and its VariantType tag. Check type and constraints before conversion; As<T> is not strict schema validation. Int maps to long and Float to double. Containers can be shared, and an Entity reference does not guarantee the object still exists.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Properties2
ObjProperty
public object? Obj { get; }Managed object representation: Int is boxed as long, Float as double, Nil becomes null. Containers and engine objects retain their reference semantics; this is not an independent deep copy.
VariantTypeProperty
public Variant.Type VariantType { get; }Tag of the actually stored engine type. Check it before strict reads: successful AsInt32 conversion does not prove the original tag was Int.
Methods227
AsT
public T? As<T>();Converts the value to supported type T through Variant conversion rules. Does not guarantee an exact original tag, allowed range or deep container copying.
TResult converted to supported T.
AsAabbAabb
public Aabb AsAabb();AabbAsBasisBasis
public Basis AsBasis();BasisAsBoolbool
public bool AsBool();boolAsBytebyte
public byte AsByte();byteAsByteArraybyte[]
public byte[] AsByteArray();byte[]AsCallableCallable
public Callable AsCallable();CallableAsCharchar
public char AsChar();charAsColorColor
public Color AsColor();ColorAsColorArrayColor[]
public Color[] AsColorArray();Color[]AsDoubledouble
public double AsDouble();Reads the stored Float as double or performs a supported numeric conversion. Check VariantType separately when the input must specifically be Float.
doubleDouble-precision number after conversion.
AsEntityPathEntityPath
public EntityPath AsEntityPath();EntityPathAsFloat32Arrayfloat[]
public float[] AsFloat32Array();float[]AsFloat64Arraydouble[]
public double[] AsFloat64Array();double[]AsInt16short
public short AsInt16();shortAsInt32int
public int AsInt32();Converts to a 32-bit integer without validating the exact original type or allowed range. Int 2147483648 narrows to -2147483648. For validation require Type.Int first and range-check AsInt64 against int bounds.
intConverted int, without range validation.
AsInt32Arrayint[]
public int[] AsInt32Array();Returns a managed copy of PackedInt32Array contents. Editing the returned int[] does not modify the packed value stored in Variant; check the corresponding tag for strict input.
int[]New managed int[] containing copied elements.
AsInt64long
public long AsInt64();Reads Int as a signed 64-bit integer or performs a supported conversion from another type. For example Float 3.75 becomes 3; this does not replace checking VariantType.
longSigned 64-bit integer after conversion.
AsInt64Arraylong[]
public long[] AsInt64Array();long[]AsPlanePlane
public Plane AsPlane();PlaneAsProjectionProjection
public Projection AsProjection();ProjectionAsQuaternionQuaternion
public Quaternion AsQuaternion();QuaternionAsReckfellArray2 overloads
public Reckfell.Collections.Array AsReckfellArray();Returns an engine Array wrapper sharing the original container, not a deep copy. Element changes are visible through other references; use Duplicate for an independent outer container.
Reckfell.Collections.ArrayWrapper for the shared engine Array.
public Reckfell.Collections.Array<T> AsReckfellArray<T>();Reckfell.Collections.Array<T>AsReckfellDictionary2 overloads
public Reckfell.Collections.Dictionary AsReckfellDictionary();Returns an engine Dictionary wrapper sharing the original contents. This does not produce System.Collections.Generic.Dictionary or a deep copy.
Reckfell.Collections.DictionaryWrapper for the shared engine Dictionary.
public Reckfell.Collections.Dictionary<TKey, TValue> AsReckfellDictionary<TKey, TValue>();Reckfell.Collections.Dictionary<TKey, TValue>AsReckfellObjectReckfellObject
public ReckfellObject AsReckfellObject();Returns the engine object with identity preserved, not a clone. An Entity can be explicitly freed while a Variant exists; use IsInstanceValid before using a potentially expired object.
ReckfellObjectEngine object or null; validate object liveness separately.
AsReckfellObjectArrayT[]
public T[] AsReckfellObjectArray<T>() where T : ReckfellObject;T[]AsRect2Rect2
public Rect2 AsRect2();Rect2AsRect2IRect2I
public Rect2I AsRect2I();Rect2IAsRidRid
public Rid AsRid();RidAsSBytesbyte
public sbyte AsSByte();sbyteAsSignalSignal
public Signal AsSignal();SignalAsSinglefloat
public float AsSingle();Converts to C# float. Stored Float has double precision, so narrowing can lose precision; this method does not validate an exact input schema.
floatConverted float, with possible precision loss.
AsStringstring
public string AsString();Returns a string representation, not proof that the stored tag is String. Check VariantType for an exact text field; this representation is not a serialization format.
stringString representation of the value.
AsStringArraystring[]
public string[] AsStringArray();string[]AsStringNameStringName
public StringName AsStringName();StringNameAsSystemArrayOfEntityPathEntityPath[]
public EntityPath[] AsSystemArrayOfEntityPath();EntityPath[]AsSystemArrayOfRidRid[]
public Rid[] AsSystemArrayOfRid();Rid[]AsSystemArrayOfStringNameStringName[]
public StringName[] AsSystemArrayOfStringName();StringName[]AsTransform2DTransform2D
public Transform2D AsTransform2D();Transform2DAsTransform3DTransform3D
public Transform3D AsTransform3D();Transform3DAsUInt16ushort
public ushort AsUInt16();ushortAsUInt32uint
public uint AsUInt32();uintAsUInt64ulong
public ulong AsUInt64();ulongAsVector2Vector2
public Vector2 AsVector2();Extracts or converts to Vector2. For an exact position field check Type.Vector2 and, when required, IsFinite; Vector2I has a different tag.
Vector2Vector2; component finiteness is not separately validated.
AsVector2ArrayVector2[]
public Vector2[] AsVector2Array();Vector2[]AsVector2IVector2I
public Vector2I AsVector2I();Vector2IAsVector3Vector3
public Vector3 AsVector3();Vector3AsVector3ArrayVector3[]
public Vector3[] AsVector3Array();Vector3[]AsVector3IVector3I
public Vector3I AsVector3I();Vector3IAsVector4Vector4
public Vector4 AsVector4();Vector4AsVector4ArrayVector4[]
public Vector4[] AsVector4Array();Vector4[]AsVector4IVector4I
public Vector4I AsVector4I();Vector4ICopyNativeVariantReckfell.NativeInterop.reckfell_variant
public Reckfell.NativeInterop.reckfell_variant CopyNativeVariant();Constructs a new NativeInterop.reckfell_variant from this instance.
The caller is responsible of disposing the new instance to avoid memory leaks.
Reckfell.NativeInterop.reckfell_variantCreateCopyingBorrowedVariant
public static Variant CreateCopyingBorrowed(in Reckfell.NativeInterop.reckfell_variant nativeValueToOwn);| Name | Type | Default |
|---|---|---|
nativeValueToOwn | Reckfell.NativeInterop.reckfell_variant | — |
VariantCreateFrom53 overloads
public static Variant CreateFrom(Aabb from);| Name | Type | Default |
|---|---|---|
from | Aabb | — |
Variantpublic static Variant CreateFrom(Basis from);| Name | Type | Default |
|---|---|---|
from | Basis | — |
Variantpublic static Variant CreateFrom(Callable from);| Name | Type | Default |
|---|---|---|
from | Callable | — |
Variantpublic static Variant CreateFrom(Reckfell.Collections.Array from);Stores an engine Array in Variant with the container shared, without deep copying.
| Name | Type | Default |
|---|---|---|
from | Reckfell.Collections.Array | — |
fromSource Reckfell.Collections.Array value with the documented copying semantics.
VariantVariant tagged Array.
public static Variant CreateFrom(Reckfell.Collections.Dictionary from);Stores an engine Dictionary in Variant with shared contents. This is not a conversion of a managed .NET dictionary.
| Name | Type | Default |
|---|---|---|
from | Reckfell.Collections.Dictionary | — |
fromSource Reckfell.Collections.Dictionary value with the documented copying semantics.
VariantVariant tagged Dictionary.
public static Variant CreateFrom(Color from);| Name | Type | Default |
|---|---|---|
from | Color | — |
Variantpublic static Variant CreateFrom(EntityPath from);| Name | Type | Default |
|---|---|---|
from | EntityPath | — |
Variantpublic static Variant CreateFrom(Plane from);| Name | Type | Default |
|---|---|---|
from | Plane | — |
Variantpublic static Variant CreateFrom(Projection from);| Name | Type | Default |
|---|---|---|
from | Projection | — |
Variantpublic static Variant CreateFrom(Quaternion from);| Name | Type | Default |
|---|---|---|
from | Quaternion | — |
Variantpublic static Variant CreateFrom(ReckfellObject from);Stores an engine object reference; null becomes Nil. The object is not cloned, and an Entity can still be explicitly freed.
| Name | Type | Default |
|---|---|---|
from | ReckfellObject | — |
fromSource Reckfell.ReckfellObject value with the documented copying semantics.
VariantVariant tagged Object; Nil for a null engine object.
public static Variant CreateFrom(ReckfellObject[] from);| Name | Type | Default |
|---|---|---|
from | ReckfellObject[] | — |
Variantpublic static Variant CreateFrom(Rect2 from);| Name | Type | Default |
|---|---|---|
from | Rect2 | — |
Variantpublic static Variant CreateFrom(Rect2I from);| Name | Type | Default |
|---|---|---|
from | Rect2I | — |
Variantpublic static Variant CreateFrom(Rid from);| Name | Type | Default |
|---|---|---|
from | Rid | — |
Variantpublic static Variant CreateFrom(Signal from);| Name | Type | Default |
|---|---|---|
from | Signal | — |
Variantpublic static Variant CreateFrom(StringName from);| Name | Type | Default |
|---|---|---|
from | StringName | — |
Variantpublic static Variant CreateFrom(Transform2D from);| Name | Type | Default |
|---|---|---|
from | Transform2D | — |
Variantpublic static Variant CreateFrom(Transform3D from);| Name | Type | Default |
|---|---|---|
from | Transform3D | — |
Variantpublic static Variant CreateFrom(Vector2 from);Stores Vector2 in Variant with the Vector2 tag, distinct from Vector2I.
| Name | Type | Default |
|---|---|---|
from | Vector2 | — |
fromSource Reckfell.Vector2 value with the documented copying semantics.
VariantVariant tagged Vector2.
public static Variant CreateFrom(Vector2I from);| Name | Type | Default |
|---|---|---|
from | Vector2I | — |
Variantpublic static Variant CreateFrom(Vector3 from);| Name | Type | Default |
|---|---|---|
from | Vector3 | — |
Variantpublic static Variant CreateFrom(Vector3I from);| Name | Type | Default |
|---|---|---|
from | Vector3I | — |
Variantpublic static Variant CreateFrom(Vector4 from);| Name | Type | Default |
|---|---|---|
from | Vector4 | — |
Variantpublic static Variant CreateFrom(Vector4I from);| Name | Type | Default |
|---|---|---|
from | Vector4I | — |
Variantpublic static Variant CreateFrom(bool from);| Name | Type | Default |
|---|---|---|
from | bool | — |
Variantpublic static Variant CreateFrom(byte from);| Name | Type | Default |
|---|---|---|
from | byte | — |
Variantpublic static Variant CreateFrom(char from);| Name | Type | Default |
|---|---|---|
from | char | — |
Variantpublic static Variant CreateFrom(double from);Stores double in the engine double-precision Float.
| Name | Type | Default |
|---|---|---|
from | double | — |
fromSource System.Double value with the documented copying semantics.
VariantVariant tagged Float.
public static Variant CreateFrom(short from);| Name | Type | Default |
|---|---|---|
from | short | — |
Variantpublic static Variant CreateFrom(int from);Stores int in signed 64-bit Int without losing the value.
| Name | Type | Default |
|---|---|---|
from | int | — |
fromSource System.Int32 value with the documented copying semantics.
VariantVariant tagged Int.
public static Variant CreateFrom(long from);Stores long in signed 64-bit Int.
| Name | Type | Default |
|---|---|---|
from | long | — |
fromSource System.Int64 value with the documented copying semantics.
VariantVariant tagged Int.
public static Variant CreateFrom(sbyte from);| Name | Type | Default |
|---|---|---|
from | sbyte | — |
Variantpublic static Variant CreateFrom(float from);Stores float in Float using double storage. Precision already lost in the source float is not recovered.
| Name | Type | Default |
|---|---|---|
from | float | — |
fromSource System.Single value with the documented copying semantics.
VariantVariant tagged Float.
public static Variant CreateFrom(Span<Color> from);| Name | Type | Default |
|---|---|---|
from | Span<Color> | — |
Variantpublic static Variant CreateFrom(Span<EntityPath> from);| Name | Type | Default |
|---|---|---|
from | Span<EntityPath> | — |
Variantpublic static Variant CreateFrom(Span<Rid> from);| Name | Type | Default |
|---|---|---|
from | Span<Rid> | — |
Variantpublic static Variant CreateFrom(Span<StringName> from);| Name | Type | Default |
|---|---|---|
from | Span<StringName> | — |
Variantpublic static Variant CreateFrom(Span<Vector2> from);| Name | Type | Default |
|---|---|---|
from | Span<Vector2> | — |
Variantpublic static Variant CreateFrom(Span<Vector3> from);| Name | Type | Default |
|---|---|---|
from | Span<Vector3> | — |
Variantpublic static Variant CreateFrom(Span<Vector4> from);| Name | Type | Default |
|---|---|---|
from | Span<Vector4> | — |
Variantpublic static Variant CreateFrom(Span<byte> from);| Name | Type | Default |
|---|---|---|
from | Span<byte> | — |
Variantpublic static Variant CreateFrom(Span<double> from);| Name | Type | Default |
|---|---|---|
from | Span<double> | — |
Variantpublic static Variant CreateFrom(Span<int> from);| Name | Type | Default |
|---|---|---|
from | Span<int> | — |
Variantpublic static Variant CreateFrom(Span<long> from);| Name | Type | Default |
|---|---|---|
from | Span<long> | — |
Variantpublic static Variant CreateFrom(Span<float> from);| Name | Type | Default |
|---|---|---|
from | Span<float> | — |
Variantpublic static Variant CreateFrom(Span<string> from);| Name | Type | Default |
|---|---|---|
from | Span<string> | — |
Variantpublic static Variant CreateFrom(string from);Stores text as the engine String without interpreting its contents as a number or JSON.
| Name | Type | Default |
|---|---|---|
from | string | — |
fromSource System.String value with the documented copying semantics.
VariantVariant tagged String.
public static Variant CreateFrom(ushort from);| Name | Type | Default |
|---|---|---|
from | ushort | — |
Variantpublic static Variant CreateFrom(uint from);| Name | Type | Default |
|---|---|---|
from | uint | — |
Variantpublic static Variant CreateFrom(ulong from);| Name | Type | Default |
|---|---|---|
from | ulong | — |
Variantpublic static Variant CreateFrom<T>(Reckfell.Collections.Array<T> from);| Name | Type | Default |
|---|---|---|
from | Reckfell.Collections.Array<T> | — |
Variantpublic static Variant CreateFrom<TKey, TValue>(Reckfell.Collections.Dictionary<TKey, TValue> from);| Name | Type | Default |
|---|---|---|
from | Reckfell.Collections.Dictionary<TKey, TValue> | — |
VariantCreateTakingOwnershipOfDisposableValueVariant
public static Variant CreateTakingOwnershipOfDisposableValue(in Reckfell.NativeInterop.reckfell_variant nativeValueToOwn);| Name | Type | Default |
|---|---|---|
nativeValueToOwn | Reckfell.NativeInterop.reckfell_variant | — |
VariantDisposevoid
public void Dispose();Releases native payload owned by the wrapper and resets this instance. Do not dispose a borrowed Variant: struct copies can share disposal bookkeeping. Do not use such aliases after disposal.
FromVariant
public static Variant From<T>(in T? from);Creates a Variant from supported value T. int and long are stored as Int, float and double as Float; a generic call does not make an arbitrary CLR class supported.
| Name | Type | Default |
|---|---|---|
from | T | — |
fromSupported value of type T to store in Variant.
VariantVariant with the corresponding engine tag and ownership semantics.
ToStringstring
public override string ToString();stringop_Explicit50 overloads
public static explicit operator Aabb(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Aabbpublic static explicit operator Basis(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Basispublic static explicit operator Callable(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Callablepublic static explicit operator Reckfell.Collections.Array(Variant from);Returns an engine Array wrapper sharing the original container, not a deep copy. Element changes are visible through other references; use Duplicate for an independent outer container.
| Name | Type | Default |
|---|---|---|
from | Variant | — |
fromVariant to convert; validate the original tag separately.
Reckfell.Collections.ArrayWrapper for the shared engine Array.
public static explicit operator Reckfell.Collections.Dictionary(Variant from);Returns an engine Dictionary wrapper sharing the original contents. This does not produce System.Collections.Generic.Dictionary or a deep copy.
| Name | Type | Default |
|---|---|---|
from | Variant | — |
fromVariant to convert; validate the original tag separately.
Reckfell.Collections.DictionaryWrapper for the shared engine Dictionary.
public static explicit operator Color(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Colorpublic static explicit operator Color[](Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Color[]public static explicit operator EntityPath(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
EntityPathpublic static explicit operator EntityPath[](Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
EntityPath[]public static explicit operator Plane(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Planepublic static explicit operator Projection(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Projectionpublic static explicit operator Quaternion(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Quaternionpublic static explicit operator ReckfellObject(Variant from);Returns the engine object with identity preserved, not a clone. An Entity can be explicitly freed while a Variant exists; use IsInstanceValid before using a potentially expired object.
| Name | Type | Default |
|---|---|---|
from | Variant | — |
fromVariant to convert; validate the original tag separately.
ReckfellObjectEngine object or null; validate object liveness separately.
public static explicit operator Rect2(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Rect2public static explicit operator Rect2I(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Rect2Ipublic static explicit operator Rid(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Ridpublic static explicit operator Rid[](Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Rid[]public static explicit operator Signal(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Signalpublic static explicit operator StringName(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
StringNamepublic static explicit operator StringName[](Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
StringName[]public static explicit operator Transform2D(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Transform2Dpublic static explicit operator Transform3D(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Transform3Dpublic static explicit operator Vector2(Variant from);Extracts or converts to Vector2. For an exact position field check Type.Vector2 and, when required, IsFinite; Vector2I has a different tag.
| Name | Type | Default |
|---|---|---|
from | Variant | — |
fromVariant to convert; validate the original tag separately.
Vector2Vector2; component finiteness is not separately validated.
public static explicit operator Vector2I(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Vector2Ipublic static explicit operator Vector2[](Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Vector2[]public static explicit operator Vector3(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Vector3public static explicit operator Vector3I(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Vector3Ipublic static explicit operator Vector3[](Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Vector3[]public static explicit operator Vector4(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Vector4public static explicit operator Vector4I(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Vector4Ipublic static explicit operator Vector4[](Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
Vector4[]public static explicit operator bool(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
boolpublic static explicit operator byte(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
bytepublic static explicit operator byte[](Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
byte[]public static explicit operator char(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
charpublic static explicit operator double(Variant from);Reads the stored Float as double or performs a supported numeric conversion. Check VariantType separately when the input must specifically be Float.
| Name | Type | Default |
|---|---|---|
from | Variant | — |
fromVariant to convert; validate the original tag separately.
doubleDouble-precision number after conversion.
public static explicit operator double[](Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
double[]public static explicit operator short(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
shortpublic static explicit operator int(Variant from);Converts to a 32-bit integer without validating the exact original type or allowed range. Int 2147483648 narrows to -2147483648. For validation require Type.Int first and range-check AsInt64 against int bounds.
| Name | Type | Default |
|---|---|---|
from | Variant | — |
fromVariant to convert; validate the original tag separately.
intConverted int, without range validation.
public static explicit operator int[](Variant from);Returns a managed copy of PackedInt32Array contents. Editing the returned int[] does not modify the packed value stored in Variant; check the corresponding tag for strict input.
| Name | Type | Default |
|---|---|---|
from | Variant | — |
fromVariant to convert; validate the original tag separately.
int[]New managed int[] containing copied elements.
public static explicit operator long(Variant from);Reads Int as a signed 64-bit integer or performs a supported conversion from another type. For example Float 3.75 becomes 3; this does not replace checking VariantType.
| Name | Type | Default |
|---|---|---|
from | Variant | — |
fromVariant to convert; validate the original tag separately.
longSigned 64-bit integer after conversion.
public static explicit operator long[](Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
long[]public static explicit operator sbyte(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
sbytepublic static explicit operator float(Variant from);Converts to C# float. Stored Float has double precision, so narrowing can lose precision; this method does not validate an exact input schema.
| Name | Type | Default |
|---|---|---|
from | Variant | — |
fromVariant to convert; validate the original tag separately.
floatConverted float, with possible precision loss.
public static explicit operator float[](Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
float[]public static explicit operator string(Variant from);Returns a string representation, not proof that the stored tag is String. Check VariantType for an exact text field; this representation is not a serialization format.
| Name | Type | Default |
|---|---|---|
from | Variant | — |
fromVariant to convert; validate the original tag separately.
stringString representation of the value.
public static explicit operator string[](Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
string[]public static explicit operator ushort(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
ushortpublic static explicit operator uint(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
uintpublic static explicit operator ulong(Variant from);| Name | Type | Default |
|---|---|---|
from | Variant | — |
ulongop_Implicit64 overloads
public static implicit operator Variant(Aabb from);| Name | Type | Default |
|---|---|---|
from | Aabb | — |
Variantpublic static implicit operator Variant(Basis from);| Name | Type | Default |
|---|---|---|
from | Basis | — |
Variantpublic static implicit operator Variant(Callable from);| Name | Type | Default |
|---|---|---|
from | Callable | — |
Variantpublic static implicit operator Variant(Reckfell.Collections.Array from);Stores an engine Array in Variant with the container shared, without deep copying.
| Name | Type | Default |
|---|---|---|
from | Reckfell.Collections.Array | — |
fromSource Reckfell.Collections.Array value with the documented copying semantics.
VariantVariant tagged Array.
public static implicit operator Variant(Reckfell.Collections.Dictionary from);Stores an engine Dictionary in Variant with shared contents. This is not a conversion of a managed .NET dictionary.
| Name | Type | Default |
|---|---|---|
from | Reckfell.Collections.Dictionary | — |
fromSource Reckfell.Collections.Dictionary value with the documented copying semantics.
VariantVariant tagged Dictionary.
public static implicit operator Variant(Color from);| Name | Type | Default |
|---|---|---|
from | Color | — |
Variantpublic static implicit operator Variant(Color[] from);| Name | Type | Default |
|---|---|---|
from | Color[] | — |
Variantpublic static implicit operator Variant(EntityPath from);| Name | Type | Default |
|---|---|---|
from | EntityPath | — |
Variantpublic static implicit operator Variant(EntityPath[] from);| Name | Type | Default |
|---|---|---|
from | EntityPath[] | — |
Variantpublic static implicit operator Variant(Plane from);| Name | Type | Default |
|---|---|---|
from | Plane | — |
Variantpublic static implicit operator Variant(Projection from);| Name | Type | Default |
|---|---|---|
from | Projection | — |
Variantpublic static implicit operator Variant(Quaternion from);| Name | Type | Default |
|---|---|---|
from | Quaternion | — |
Variantpublic static implicit operator Variant(ReckfellObject from);Stores an engine object reference; null becomes Nil. The object is not cloned, and an Entity can still be explicitly freed.
| Name | Type | Default |
|---|---|---|
from | ReckfellObject | — |
fromSource Reckfell.ReckfellObject value with the documented copying semantics.
VariantVariant tagged Object; Nil for a null engine object.
public static implicit operator Variant(ReckfellObject[] from);| Name | Type | Default |
|---|---|---|
from | ReckfellObject[] | — |
Variantpublic static implicit operator Variant(Rect2 from);| Name | Type | Default |
|---|---|---|
from | Rect2 | — |
Variantpublic static implicit operator Variant(Rect2I from);| Name | Type | Default |
|---|---|---|
from | Rect2I | — |
Variantpublic static implicit operator Variant(Rid from);| Name | Type | Default |
|---|---|---|
from | Rid | — |
Variantpublic static implicit operator Variant(Rid[] from);| Name | Type | Default |
|---|---|---|
from | Rid[] | — |
Variantpublic static implicit operator Variant(Signal from);| Name | Type | Default |
|---|---|---|
from | Signal | — |
Variantpublic static implicit operator Variant(StringName from);| Name | Type | Default |
|---|---|---|
from | StringName | — |
Variantpublic static implicit operator Variant(StringName[] from);| Name | Type | Default |
|---|---|---|
from | StringName[] | — |
Variantpublic static implicit operator Variant(Transform2D from);| Name | Type | Default |
|---|---|---|
from | Transform2D | — |
Variantpublic static implicit operator Variant(Transform3D from);| Name | Type | Default |
|---|---|---|
from | Transform3D | — |
Variantpublic static implicit operator Variant(Vector2 from);Stores Vector2 in Variant with the Vector2 tag, distinct from Vector2I.
| Name | Type | Default |
|---|---|---|
from | Vector2 | — |
fromSource Reckfell.Vector2 value with the documented copying semantics.
VariantVariant tagged Vector2.
public static implicit operator Variant(Vector2I from);| Name | Type | Default |
|---|---|---|
from | Vector2I | — |
Variantpublic static implicit operator Variant(Vector2[] from);| Name | Type | Default |
|---|---|---|
from | Vector2[] | — |
Variantpublic static implicit operator Variant(Vector3 from);| Name | Type | Default |
|---|---|---|
from | Vector3 | — |
Variantpublic static implicit operator Variant(Vector3I from);| Name | Type | Default |
|---|---|---|
from | Vector3I | — |
Variantpublic static implicit operator Variant(Vector3[] from);| Name | Type | Default |
|---|---|---|
from | Vector3[] | — |
Variantpublic static implicit operator Variant(Vector4 from);| Name | Type | Default |
|---|---|---|
from | Vector4 | — |
Variantpublic static implicit operator Variant(Vector4I from);| Name | Type | Default |
|---|---|---|
from | Vector4I | — |
Variantpublic static implicit operator Variant(Vector4[] from);| Name | Type | Default |
|---|---|---|
from | Vector4[] | — |
Variantpublic static implicit operator Variant(bool from);Stores bool in a Variant tagged Bool, not Int.
| Name | Type | Default |
|---|---|---|
from | bool | — |
fromC# boolean value.
VariantVariant tagged Bool.
public static implicit operator Variant(byte from);| Name | Type | Default |
|---|---|---|
from | byte | — |
Variantpublic static implicit operator Variant(byte[] from);| Name | Type | Default |
|---|---|---|
from | byte[] | — |
Variantpublic static implicit operator Variant(char from);| Name | Type | Default |
|---|---|---|
from | char | — |
Variantpublic static implicit operator Variant(double from);Stores double in the engine double-precision Float.
| Name | Type | Default |
|---|---|---|
from | double | — |
fromSource System.Double value with the documented copying semantics.
VariantVariant tagged Float.
public static implicit operator Variant(double[] from);| Name | Type | Default |
|---|---|---|
from | double[] | — |
Variantpublic static implicit operator Variant(short from);| Name | Type | Default |
|---|---|---|
from | short | — |
Variantpublic static implicit operator Variant(int from);Stores int in signed 64-bit Int without losing the value.
| Name | Type | Default |
|---|---|---|
from | int | — |
fromSource System.Int32 value with the documented copying semantics.
VariantVariant tagged Int.
public static implicit operator Variant(int[] from);Copies managed int[] elements into PackedInt32Array. Editing the source array does not change the existing Variant.
| Name | Type | Default |
|---|---|---|
from | int[] | — |
fromSource System.Int32[] value with the documented copying semantics.
VariantVariant tagged PackedInt32Array.
public static implicit operator Variant(long from);Stores long in signed 64-bit Int.
| Name | Type | Default |
|---|---|---|
from | long | — |
fromSource System.Int64 value with the documented copying semantics.
VariantVariant tagged Int.
public static implicit operator Variant(long[] from);| Name | Type | Default |
|---|---|---|
from | long[] | — |
Variantpublic static implicit operator Variant(sbyte from);| Name | Type | Default |
|---|---|---|
from | sbyte | — |
Variantpublic static implicit operator Variant(float from);Stores float in Float using double storage. Precision already lost in the source float is not recovered.
| Name | Type | Default |
|---|---|---|
from | float | — |
fromSource System.Single value with the documented copying semantics.
VariantVariant tagged Float.
public static implicit operator Variant(float[] from);| Name | Type | Default |
|---|---|---|
from | float[] | — |
Variantpublic static implicit operator Variant(Span<Color> from);| Name | Type | Default |
|---|---|---|
from | Span<Color> | — |
Variantpublic static implicit operator Variant(Span<EntityPath> from);| Name | Type | Default |
|---|---|---|
from | Span<EntityPath> | — |
Variantpublic static implicit operator Variant(Span<Rid> from);| Name | Type | Default |
|---|---|---|
from | Span<Rid> | — |
Variantpublic static implicit operator Variant(Span<StringName> from);| Name | Type | Default |
|---|---|---|
from | Span<StringName> | — |
Variantpublic static implicit operator Variant(Span<Vector2> from);| Name | Type | Default |
|---|---|---|
from | Span<Vector2> | — |
Variantpublic static implicit operator Variant(Span<Vector3> from);| Name | Type | Default |
|---|---|---|
from | Span<Vector3> | — |
Variantpublic static implicit operator Variant(Span<Vector4> from);| Name | Type | Default |
|---|---|---|
from | Span<Vector4> | — |
Variantpublic static implicit operator Variant(Span<byte> from);| Name | Type | Default |
|---|---|---|
from | Span<byte> | — |
Variantpublic static implicit operator Variant(Span<double> from);| Name | Type | Default |
|---|---|---|
from | Span<double> | — |
Variantpublic static implicit operator Variant(Span<int> from);| Name | Type | Default |
|---|---|---|
from | Span<int> | — |
Variantpublic static implicit operator Variant(Span<long> from);| Name | Type | Default |
|---|---|---|
from | Span<long> | — |
Variantpublic static implicit operator Variant(Span<float> from);| Name | Type | Default |
|---|---|---|
from | Span<float> | — |
Variantpublic static implicit operator Variant(Span<string> from);| Name | Type | Default |
|---|---|---|
from | Span<string> | — |
Variantpublic static implicit operator Variant(string from);Stores text as the engine String without interpreting its contents as a number or JSON.
| Name | Type | Default |
|---|---|---|
from | string | — |
fromSource System.String value with the documented copying semantics.
VariantVariant tagged String.
public static implicit operator Variant(string[] from);| Name | Type | Default |
|---|---|---|
from | string[] | — |
Variantpublic static implicit operator Variant(ushort from);| Name | Type | Default |
|---|---|---|
from | ushort | — |
Variantpublic static implicit operator Variant(uint from);| Name | Type | Default |
|---|---|---|
from | uint | — |
Variantpublic static implicit operator Variant(ulong from);| Name | Type | Default |
|---|---|---|
from | ulong | — |
VariantVariant.Operator
| Value | Description |
|---|---|
Add = 6 | Addition operator ( |
And = 20 | Logical AND operator ( |
BitAnd = 16 | Bitwise AND operator ( |
BitNegate = 19 | Bitwise NOT operator ( |
BitOr = 17 | Bitwise OR operator ( |
BitXor = 18 | Bitwise XOR operator ( |
Divide = 9 | Division operator ( |
Equal = 0 | Equality operator ( |
Greater = 4 | Greater than operator ( |
GreaterEqual = 5 | Greater than or equal operator ( |
In = 24 | Logical IN operator ( |
Less = 2 | Less than operator ( |
LessEqual = 3 | Less than or equal operator ( |
Max = 25 | Represents the size of the |
Module = 12 | Remainder/modulo operator ( |
Multiply = 8 | Multiplication operator ( |
Negate = 10 | Unary negation operator ( |
Not = 23 | Logical NOT operator ( |
NotEqual = 1 | Inequality operator ( |
Or = 21 | Logical OR operator ( |
Positive = 11 | Unary plus operator ( |
Power = 13 | Power operator ( |
ShiftLeft = 14 | Left shift operator ( |
ShiftRight = 15 | Right shift operator ( |
Subtract = 7 | Subtraction operator ( |
Xor = 22 | Logical XOR operator (not implemented in C#). |
Variant.Type
| Value | Description |
|---|---|
Aabb = 16 | Variable is of type |
Array = 28 | Variable is of type |
Basis = 17 | Variable is of type |
Bool = 1 | Variable is of type [bool]. |
Callable = 25 | Variable is of type |
Color = 20 | Variable is of type |
Dictionary = 27 | Variable is of type |
EntityPath = 22 | Variable is of type |
Float = 3 | Variable is of type [float]. |
Int = 2 | Variable is of type [int]. |
Max = 39 | Represents the size of the |
Nil = 0 | Variable is |
Object = 24 | Variable is of type |
PackedByteArray = 29 | Variable is of type |
PackedColorArray = 37 | Variable is of type |
PackedFloat32Array = 32 | Variable is of type |
PackedFloat64Array = 33 | Variable is of type |
PackedInt32Array = 30 | Variable is of type |
PackedInt64Array = 31 | Variable is of type |
PackedStringArray = 34 | Variable is of type |
PackedVector2Array = 35 | Variable is of type |
PackedVector3Array = 36 | Variable is of type |
PackedVector4Array = 38 | Variable is of type |
Plane = 14 | Variable is of type |
Projection = 19 | Variable is of type |
Quaternion = 15 | Variable is of type |
Rect2 = 7 | Variable is of type |
Rect2I = 8 | Variable is of type |
Rid = 23 | Variable is of type |
Signal = 26 | Variable is of type |
String = 4 | Variable is of type |
StringName = 21 | Variable is of type |
Transform2D = 11 | Variable is of type |
Transform3D = 18 | Variable is of type |
Vector2 = 5 | Variable is of type |
Vector2I = 6 | Variable is of type |
Vector3 = 9 | Variable is of type |
Vector3I = 10 | Variable is of type |
Vector4 = 12 | Variable is of type |
Vector4I = 13 | Variable is of type |