Search Unity

Unity 4 web player unityObject.getObjectById dont work

Discussion in 'Scripting' started by Chacek, Nov 22, 2012.

  1. Chacek

    Chacek

    Joined:
    Nov 10, 2010
    Posts:
    5
    Hi. I have problem with unity 4 webplayer and html communication. Sending value from unity works ok but another way I have same problem.

    normal I use
    Code (csharp):
    1. var unity = unityObject.getObjectById("unityPlayer");
    2.  
    3. unity.SendMessage("objectname", "script name", walue);
    but since I have new version of Unity it's stops working.

    Is any another way to send value from html?
     
  2. guido123

    guido123

    Joined:
    Dec 28, 2013
    Posts:
    1
    try
    var u = new UnityObject2(config);
    u.getUnity().SendMessage

    it works for me