I'm using the SendMessage function in my html page to send arrays to the unity web player. No matter how I initialize and use the array it always comes through as a length 1024 array in the player, whether I pass in one shorter or longer. Is this a bug? And if not how do I fix this issue?
function SendObjectListToUnity()
{
//var objects=new Array();
//var objects=new Array(3);
var objects =[];
/*objects[0]="object1";
objects[1]="object2";
objects[2]="object3";*/
for (var i=0;i<1100;i++)
objects[i]=i;
u.getUnity().SendMessage("Global Scripts", "SetObjectList", objects);
}
public void SetObjectList(object[] objects)
{
Log(objects.Length);
}
↧