Beispiel #1
0
    public void InitManagers()
    {
        this.gameObject.AddComponent <NotDestoryGo>();

        if (canvasRootManager == null)
        {
            GameObject UICanvas = GameObject.Find("UICanvas");
            if (UICanvas != null)
            {
                canvasRootManager = UICanvas.AddComponent <CanvasRootManager>();
                UICanvas.AddComponent <NotDestoryGo>();
            }
        }
        if (httpNetManager == null)
        {
            httpNetManager = this.gameObject.AddComponent <HttpNetManager>();
        }
        if (webSocketNetManager == null)
        {
            webSocketNetManager = this.gameObject.AddComponent <WebSocketNetManager>();
        }
    }
Beispiel #2
0
 private void Awake()
 {
     instance = this;
 }