title: Cannot instantiate prefab when trying to in websocket message event
body: <p>I'm using Websocket-Sharp to do this.</p>
  <p>This code works when I use it but I can't because I need it to happen once a WebSocket message is received</p>
  <pre><code>static void NewPlayer(String name) 
      {
          GameObject player = Instantiate((GameObject) Resources.Load(&quot;Player Model&quot;), Vector3.zero, Quaternion.identity) as GameObject;
          player.name = name;
          return;
      }
  
  private void Start()
      {
          ws = new WebSocket(&quot;wss://servantchild-isu-game-2021.herokuapp.com&quot;);
          ws.Connect();
          NewPlayer(&quot;Name&quot;);
      }
  </code></pre>
  <p>Doesn't work when I use the code (I also know that the event fires and that the actual method is called but the prefab won't instantiate)</p>
  <pre><code>static void NewPlayer(String name) 
          {
              GameObject player = Instantiate((GameObject) Resources.Load(&quot;Player Model&quot;), Vector3.zero, Quaternion.identity) as GameObject;
              player.name = name;
              return;
          }
  private void Start()
      {
          ws = new WebSocket(&quot;wss://servantchild-isu-game-2021.herokuapp.com&quot;);
          ws.Connect();
          ws.OnMessage += (sender, e) =&gt;
          {
      if (e.Data.StartsWith(&quot;Player Joined:&quot;))
              {
                  NewPlayer(Int32.Parse(e.Data.Split(':')[1]).ToString());
              }
      };
      }
  </code></pre>