sendMessage from Flash to Unity


I’ll go direct to the matter.

I have a Unity project which currently has a script attached to a Game Object called “Simulator”. This script containsa a function called “SetModel”, which has an int input variable. This function shows the number from the input variable in a GUIText.
This variable should come from a sendMessage from Flash.

So… when I use in flash a sendMessage like this:
“_unity_loader.sendMessage(“Simulator”, “SetModel”, 1);” it supposedly should send a message to Unity and the GUIText should change to “1”, but it doesn’t.

All I get is this error:
     ReferenceError: Error #1056:Can't create the property isActionScriptMessage inNumber.
at com.unity::UnityContentInternal/sendMessage()
at com.unity::UnityContent/sendMessage()
at Main/showUnityContent()[C:\Users\3D-Mañana\Desktop\Carlos\ProPreloader3\src\]
at Main/buttonClickHandler()[C:\Users\3D-Mañana\Desktop\Carlos\ProPreloader3\src\]

I know Unity is loading correctly, as there is more content within the project, and it’s fully functional, but I can’t manage to send the message, somehow.



For future reference go here