- Home /
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? Thanks
Answer by Super Flat · May 04, 2012 at 01:19 PM
Hi!
This helped me with the same problem. Hope it solves yours! http://forum.unity3d.com/threads/134762-Getting-data-from-flash-into-unity
Answer by Super Flat · May 04, 2012 at 02:00 PM
Hi !
This helped me quite a bit, i hope it works for you as well :)
http://forum.unity3d.com/threads/134762-Getting-data-from-flash-into-unity