Open Hailiebaby16 opened 1 year ago
As I mentioned on https://github.com/itisnajim/SocketIOUnity#receiving
if you want to play with unity game objects (eg: rotating an object)
or saving data using PlayerPrefs system (or anything else like SceneManager.LoadScene)
use OnUnityThread instead
To make your code work, do the following:
socket.OnUnityThread("hello", (response) =>
{
Debug.Log("Receive Hello");
loadnewscene();
});