Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
GType
core-defs.swift:1561enum GType
Cases
case `nil`
Variable is
null
.case bool
Variable is of type [bool].
case int
Variable is of type integer.
case float
Variable is of type float.
case string
Variable is of type
String
.case vector2
Variable is of type
Vector2
.case vector2i
Variable is of type
Vector2i
.case rect2
Variable is of type
Rect2
.case rect2i
Variable is of type
Rect2i
.case vector3
Variable is of type
Vector3
.case vector3i
Variable is of type
Vector3i
.case transform2d
Variable is of type
Transform2D
.case vector4
Variable is of type
Vector4
.case vector4i
Variable is of type
Vector4i
.case plane
Variable is of type
Plane
.case quaternion
Variable is of type
Quaternion
.case aabb
Variable is of type
AABB
.case basis
Variable is of type
Basis
.case transform3d
Variable is of type
Transform3D
.case projection
Variable is of type
Projection
.case color
Variable is of type
Color
.case stringName
Variable is of type
StringName
.case nodePath
Variable is of type
NodePath
.case rid
Variable is of type
RID
.case object
Variable is of type
Object
.case callable
Variable is of type
Callable
.case signal
Variable is of type
Signal
.case dictionary
Variable is of type
GDictionary
.case array
Variable is of type
GArray
.case packedByteArray
Variable is of type
PackedByteArray
.case packedInt32Array
Variable is of type
PackedInt32Array
.case packedInt64Array
Variable is of type
PackedInt64Array
.case packedFloat32Array
Variable is of type
PackedFloat32Array
.case packedFloat64Array
Variable is of type
PackedFloat64Array
.case packedStringArray
Variable is of type
PackedStringArray
.case packedVector2Array
Variable is of type
PackedVector2Array
.case packedVector3Array
Variable is of type
PackedVector3Array
.case packedColorArray
Variable is of type
PackedColorArray
.case max
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (15) members.
Types
enum Operator
enum VariantIndexerError
Errors raised by the variant subscript
Type members
init(
) Creates an empty Variant, that represents the Godot type
nil
init(Variant
) Creates a new Variant based on a copy of the reference variant passed in
init(some VariantStorable
) static func typeName(GType
) -> String Gets the name of a Variant type.
static func == (lhs: Variant, rhs: Variant
) -> Bool Compares two variants, does this by delegating the comparison to Godot
Instance members
var debugDescription: String
var description: String
var gtype: GType
This describes the type of the data wrapped by this variant
var isNull: Bool
Returns true if the variant is flagged as being an object (
gtype == .object
) and it has a nil pointer.subscript(Int
) -> Variant? Variants that represent arrays can be indexed, this subscript allows you to fetch the individual elements of those arrays
func asObject<T>(T.Type
) -> T? Attempts to cast the Variant into a SwiftGodot.Object, if the variant contains a value of type
.object
, then a.object, the value
nil` is returned.func call(method: StringName, Variant...
) -> Result<Variant, CallErrorType> Invokes a variant’s method by name.
func hash(into: inout Hasher
)
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.