Send message from Browser to Unity3D
<p>I am trying to send a message to my Unity3D WebGl app.</p>

<p>The controller of my GameObject "Player" looks basically like this:</p>

<pre><code>public class color : MonoBehaviour {

    void Start ()
    {
        gameObject.GetComponent&lt;Renderer&gt;().material.color = Color.red;
    }

    public void green(string s)
    {
        gameObject.GetComponent&lt;Renderer&gt;().material.color = Color.green;
    }
} 
</code></pre>

<p>and my Javascript method like this:</p>

<pre><code>function SaySomethingToUnity() {
    SendMessage("Player", "green", "teeeext");
}
</code></pre>

<p>But when I call it nothing happens. What am I doing wrong?</p>