コード例 #1
0
 void Awake()
 {
     if (Application.platform != RuntimePlatform.WebGLPlayer)
     {
         socketIO = gameObject.AddComponent <NativeSocketIO>();
         socketIO.Init(settings);
     }
 }
コード例 #2
0
 void Awake()
 {
     if (Application.platform == RuntimePlatform.WebGLPlayer)
     {
         socketIO = gameObject.AddComponent <WebGLSocketIO>();
     }
     else
     {
         socketIO = gameObject.AddComponent <NativeSocketIO>();
     }
     print("AWAKE");
     //socketIO.Init(settings);
 }
コード例 #3
0
        private void Awake()
        {
            if (Application.platform == RuntimePlatform.WebGLPlayer)
            {
                socket = gameObject.AddComponent <WebGLSocketIO>();
            }
            else
            {
                socket = gameObject.AddComponent <NativeSocketIO>();
            }

            socket.Init(settings);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
 public void SetSocketReference(BaseSocketIO Socket)
 {
     socket = Socket;
 }