16 private GameObject hideThisObject = null;
19 private GameObject spawnThisPrefab = null;
22 private bool updateSolverTargetToClickSource =
true;
25 private GameObject spawnedObject;
30 if (hideThisObject == null || spawnThisPrefab == null)
38 spawnedObject = Instantiate(spawnThisPrefab, hideThisObject.transform.position, hideThisObject.transform.rotation);
39 spawnedObject.SetActive(
false);
45 if (spawnedObject.activeSelf)
47 spawnedObject.SetActive(
false);
48 hideThisObject.SetActive(
true);
52 spawnedObject.SetActive(
true);
54 if (updateSolverTargetToClickSource && solverHandler != null)
58 if (interactionInputSource != null)
80 Debug.LogError(
"The click event came from a device that isn't tracked. Nothing to attach to! Use a controller to select an example.");
87 hideThisObject.SetActive(
false);
93 private void OnDestroy()
95 Destroy(spawnedObject);
96 Destroy(hideThisObject);