Hi,
I have an Array
CharacterInput2D[] inputs
of struct:
public struct CharacterInput2D
{
public CharacterInput2D(Vector2 _destination, int _index)
{
destination = _destination;
index = _index;
}
public Vector2 destination;
public int index;
}
that I need to use a s parameter in a rpc
RpcId(Global.SERVER_ID, "Move", inputs);
Currently I have an error:
E 0:00:12.668 mono_object_to_variant_impl: Attempted to convert a managed array of unmarshallable element type to Variant.
<C++ Error> Method failed. Returning: Variant()
<C++ Source> modules/mono/mono_gd/gd_mono_marshal.cpp:809 @ mono_object_to_variant_impl()
<Stack Trace> :0 @ System.Object Godot.NativeCalls.godot_icall_3_577(IntPtr , IntPtr , Int32 , System.String , ....
while in server I have
[Puppet]
public void Move(CharacterInput2D[] inputs)
{....}
Where is the problem? I can still use structs ?
Thank you.