Static Methodmigueldeicaza.swiftgodot 0.46.0SwiftGodot
makeOrUnwrap(_:)
Unwraps an object from a variant.
static func makeOrUnwrap(_ variant: Variant) -> Self? where Self : Object Unwraps an object from a variant.
static func makeOrUnwrap(_ variant: Variant) -> Self? where Self : Object s10SwiftGodot15VariantStorablePAAE12makeOrUnwrapyxSgAA0C0CAA6ObjectCRbzrlFZ What are these?5FDU8import SwiftGodotFramework to write Godot Game Extensions using the Swift Programming Language.
protocol VariantStorableTypes that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
class VariantVariant objects box various Godot Objects, you create them with one of the constructors, and you can retrieve the contents using the various extension constructors that are declared on the various types that are wrapped.
class ObjectBase class for all other classes in the engine.
static func makeOrUnwrap(_ variant: Variant) -> Self? Unwraps an object from a variant. This is useful when you want one method to call that will return the unwrapped Variant, regardless of whether it is a SwiftGodot.Object or not.