I am using websocket-sharp, and it can connect to my websocket server and can receive message. I try to load scene from onMessage, but it doens't work. Following is onMessage:
ws.OnMessage += (sender, e) =>
{
Debug.Log("before load scene");
SceneManager.LoadScene("Game");
Debug.Log("after load scene");
};
It will print before load scene
, but it can not load scene and it doesn't print after load scene