Пример #1
0
    // ---------------------------------------------------------------------------------------------


    // CAVE2 Cluster Management --------------------------------------------------------------------
    public static CAVE2Manager GetCAVE2Manager()
    {
        if (CAVE2Manager_Instance == null)
        {
            GameObject cave2Manager = GameObject.Find("CAVE2-Manager");
            CAVE2Manager_Instance = cave2Manager.GetComponent <CAVE2Manager>();

            if (CAVE2Manager_Instance == null)
            {
                Debug.LogWarning("CAVE2Manager_Instance is NULL - SHOULD NOT HAPPEN!");
            }
            else
            {
                Debug.LogWarning("Reintializing CAVE2Manager_Instance");
                CAVE2Manager_Instance.Init();
            }
            //GameObject cave2Manager = new GameObject("CAVE2-Manager");
            //cave2Manager.AddComponent<OmicronManager>();
            //CAVE2Manager_Instance = cave2Manager.AddComponent<CAVE2Manager>();
            //cave2Manager.AddComponent<CAVE2InputManager>();
            //cave2Manager.AddComponent<CAVE2AdvancedTrackingSimulator>();
            //cave2Manager.AddComponent<CAVE2RPCManager>();
        }
        return(CAVE2Manager_Instance);
    }