Closed EstevanBR closed 5 months ago
If you try to @Export a GArray or a Variant you get this error:
@Export
GArray
Variant
if let res: GArray = args [0].asObject () {
instance method 'asObject' requires that 'GArray' conform to 'GodotObject'
In this case we'd want GArray(args[0])
GArray(args[0])
if let res: Variant = args [0].asObject () {
instance method 'asObject' requires that 'Variant' conform to 'GodotObject'
In this case we could just have if let res = args.first (IMO we should be using args.first any place we use args[0])
if let res = args.first
Fascinating, in both cases, those are the incorrect casts.
There is no need of the asObject in the Variant case, and for the GArray case we need to call GArray (args[0]) instead.
asObject
GArray (args[0])
Almost have this fixed.
If you try to
@Export
aGArray
or aVariant
you get this error:GArray
In this case we'd want
GArray(args[0])
Variant
In this case we could just have
if let res = args.first
(IMO we should be using args.first any place we use args[0])