void Awake() { if (Application.platform != RuntimePlatform.WebGLPlayer) { socketIO = gameObject.AddComponent <NativeSocketIO>(); socketIO.Init(settings); } }
void Awake() { if (Application.platform == RuntimePlatform.WebGLPlayer) { socketIO = gameObject.AddComponent <WebGLSocketIO>(); } else { socketIO = gameObject.AddComponent <NativeSocketIO>(); } print("AWAKE"); //socketIO.Init(settings); }
private void Awake() { if (Application.platform == RuntimePlatform.WebGLPlayer) { socket = gameObject.AddComponent <WebGLSocketIO>(); } else { socket = gameObject.AddComponent <NativeSocketIO>(); } socket.Init(settings); }
void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else if (instance != null) { Destroy(gameObject); } if (Application.platform == RuntimePlatform.WebGLPlayer) { socketIO = gameObject.AddComponent <WebGLSocketIO>(); } else { socketIO = gameObject.AddComponent <NativeSocketIO>(); } socketIO.Init(settings); }
public void SetSocketReference(BaseSocketIO Socket) { socket = Socket; }