Open jrockett6 opened 9 months ago
I dont think the right solution would be to allow user-defined GodotType
, rather we should decide on what types can be stored in arrays. For instance we could allow all GodotConvert + ToGodot + FromGodot
types, or maybe add a Arrayable
trait for things that can go in arrays. or something else.
If we want to do this properly, we need Arrayable
(named ArrayElem
maybe), because not every GodotType
can be stored inside arrays.
For example, Array<Array<i32>>
is not exportable, because the Godot runtime only stores type information about the outer array type.
I have an enum
and I would like to be able to
but
Array
can only hold a GodotType.Storing an
Array<i32>
is ok, but we don't have the enum names in the editor and recreating the enum back in rust requires some extra steps.Would be solved by #334, but posting this as I think this problem much less complex.