public IEnumerator TestGazeProviderDestroyed() { yield return(PlayModeTestUtilities.WaitForInputSystemUpdate()); // remove the gaze provider and it's components from the scene GazeProvider gazeProvider = CoreServices.InputSystem.GazeProvider.GameObjectReference.GetComponent <GazeProvider>(); gazeProvider.GazePointer.BaseCursor.Destroy(); DebugUtilities.LogVerbose("Application was playing, destroyed the gaze pointer's BaseCursor"); UnityObjectExtensions.DestroyObject(gazeProvider); gazeProvider = null; // Ensure that the input system and it's related input sources are able to be reinitialized without issue. yield return(PlayModeTestUtilities.WaitForInputSystemUpdate()); PlayModeTestUtilities.GetInputSystem().Initialize(); yield return(PlayModeTestUtilities.WaitForInputSystemUpdate()); yield return(null); }
private Cursor(GameObject prefab, GazeProvider provider) { cursorObj = GameObject.Instantiate(prefab); this.provider = provider; }
/// <summary> /// Creates a Cursor Singleton /// </summary> /// <param name="cursorPrefab"></param> /// <param name="provider"></param> public static void Instantiate(GameObject cursorPrefab, GazeProvider provider) => instance = new Cursor(cursorPrefab, provider);
private void Start() { gazeProvider = FindObjectOfType <GazeProvider>(); //closeMenu(); openMenu(); }