You can access the javascript UnityObject2 like this:
Application.ExternalEval("u.getUnity()....);
That will get a hold of the unity player object.
سؤال
With the Facebook Unity SDK, how do I get access to the unity player object, so that I can call UnityObject.SendMessage()
from the browser to the unity player? Similar to the section described here: Calling Unity web player content functions from the web page.
The problem is that the facebook integration bypasses the HTML page that creates the UnityObject2
, and hence I have no way of geting a hold of the unity player object.
Thanks!
المحلول
You can access the javascript UnityObject2 like this:
Application.ExternalEval("u.getUnity()....);
That will get a hold of the unity player object.