Object from flash to unity

I’m trying to send an object from flash to my unity swf export that I’m loading, everything works fine, even if I send it back to flash I can read it’s properties, but seems like I can’t do it on my c#.

Here’s what I’m sending:

var myObj:Object = { _x:xPos, _y:yPos };
unitLoader.unityContent.sendMessage(“Cube”, “SetPosition”, myObj );

And here’s how I’m trying to access it:

void SetPosition(object o)
float _x = o._x;
float _y = o._y;


But Unity won’t even let me compile this, saying that “o” has no _x or _y property.
Can anyone help me with that?


This helped me with the same problem. Hope it solves yours!

Hi !

This helped me quite a bit, i hope it works for you as well :slight_smile: