is there a way to send an array through RPC?

I'm looking to send

var anarray = new List.<float>();

through RPC, but I guess it's not supported by the "common" types for RPC

  * int
    * float
    * string
    * NetworkPlayer
    * NetworkViewID
    * Vector3
    * Quaternion 

so how do I send an array[] or list, through a multiplayer?

What is in the list of float that you want to send, could it be contained in something else like a vector3 and just broken apart on the other side?


What you could do is take your entire list of floats and do something like this.

var stringOfAllFloats : String = "";
for(var listItem in listOfFloats){
    stringOfAllFloats += listItem.ToString() + ",";


networkView.RPC("SendListOfFloats", RPCMode.Server, stringOfFloats);

What I did here is too the list of floats and went through the entire thing, then you to string the floats and accumulate them into the string variable I declared above. After you are done packing all the floats into the string you trim the comma off the end.

Now once this string arrives on the other side you can String.Split(","[0]) and for each separate string in the array convert them back into floats and store them.

This feature is available in a third party network engine called uLink from

When we created uLink, a network engine that replaces the Unity network, we added support for serializing arrays, enums and complete object hierarchies out of the box. The complete list of supported datatypes is available on the uLink developer site. In addition you can code your own serializers for any data type and make uLink use your custom serializers.

Please check out the powerful features uLink has, that Unity network does not, and especially take a look at how easy it is to migrate from Unity Network to uLink via the two-click converter.