private void PointerStateValid(object sender, DestinationMarkerEventArgs e) { if (!valid) { events = uiPointer.controllerEvents; touchTeleport.AddDisabler(events, gameObject); valid = true; } }
private void InteractableObjectGrabbed(object sender, InteractableObjectEventArgs e) { controllerEvents = e.interactingObject.GetComponent <VRTK_ControllerEvents>(); if (teleportDisabler) { teleportDisabler.AddDisabler(controllerEvents, gameObject); } else { foreach (var teleporter in controllerEvents.GetComponentsInChildren <VRTK_Pointer>()) { teleporter.enabled = false; } } controllerEvents.TouchpadPressed += ControllerEvents_TriggerClicked; }