Пример #1
0
        static void Setup()
        {
            Debug.Assert(Application.isEditor);
            Debug.Assert(!Application.isPlaying);
            Application.logMessageReceived += HandleLog;

            CleanControllers();
            left_ctrl  = Baroque.GetSteamVRManager_Left().gameObject.AddComponent <FakeController>();
            right_ctrl = Baroque.GetSteamVRManager_Right().gameObject.AddComponent <FakeController>();
            Baroque._InitTests();
        }
Пример #2
0
        static void CleanControllers()
        {
            left_ctrl = right_ctrl = null;

            var golist = new GameObject[] { Baroque.GetSteamVRManager_Left().gameObject, Baroque.GetSteamVRManager_Right().gameObject };

            foreach (var go in golist)
            {
                Controller ctrl = go.GetComponent <FakeController>();
                if (ctrl != null)
                {
                    DestroyImmediate(ctrl);
                }
            }
        }