//------------------------------------------------- private void HidePointer() { if (visible) { pointerHideStartTime = Time.time; } visible = false; if (pointerHand) { if (ShouldOverrideHoverLock()) { //Restore the original hovering interactable on the hand if (originalHoverLockState == true) { pointerHand.HoverLock(originalHoveringInteractable); } else { pointerHand.HoverUnlock(null); } } //Stop looping sound loopingAudioSource.Stop(); PlayAudioClip(pointerAudioSource, pointerStopSound); } teleportPointerObject.SetActive(false); teleportArc.Hide(); foreach (TeleportMarkerBase teleportMarker in teleportMarkers) { if (teleportMarker != null && teleportMarker.markerActive && teleportMarker.gameObject != null) { if (teleportMarker.VisibleOnTeleportOnly) { teleportMarker.gameObject.SetActive(false); } } } destinationReticleTransform.gameObject.SetActive(false); invalidReticleTransform.gameObject.SetActive(false); offsetReticleTransform.gameObject.SetActive(false); if (playAreaPreviewTransform != null) { playAreaPreviewTransform.gameObject.SetActive(false); } if (onActivateObjectTransform.gameObject.activeSelf) { onActivateObjectTransform.gameObject.SetActive(false); } onDeactivateObjectTransform.gameObject.SetActive(true); pointerHand = null; }
//------------------------------------------------- private void HidePointer() { if (visible) { pointerHideStartTime = Time.time; } visible = false; if (pointerHand) { //Stop looping sound loopingAudioSource.Stop(); PlayAudioClip(pointerAudioSource, pointerStopSound); } teleportPointerObject.SetActive(false); teleportArc.Hide(); foreach (TeleportMarkerBase teleportMarker in teleportMarkers) { if (teleportMarker != null && teleportMarker.markerActive && teleportMarker.gameObject != null) { teleportMarker.gameObject.SetActive(false); } } destinationReticleTransform.gameObject.SetActive(false); invalidReticleTransform.gameObject.SetActive(false); offsetReticleTransform.gameObject.SetActive(false); if (playAreaPreviewTransform != null) { playAreaPreviewTransform.gameObject.SetActive(false); } if (onActivateObjectTransform.gameObject.activeSelf) { onActivateObjectTransform.gameObject.SetActive(false); } onDeactivateObjectTransform.gameObject.SetActive(true); pointerHand = null; }
void HidePointer() { if (visible) { pointerHideStartTime = Time.time; } visible = false; if (ShouldOverrideHoverLock()) { //Restore the original hovering interactable on the hand if (originalHoverLockState == true) { player.rightHand.HoverLock(originalHoveringInteractable); } else { player.rightHand.HoverUnlock(null); } } pointerAudioSource.PlayClip(pointerStopSound); teleportPointerObject.SetActive(false); teleportArc.Hide(); for (int i = 0; i < teleportMarkers.Length; i++) { if (teleportMarkers[i].markerActive) { teleportMarkers[i].gameObject.SetActive(false); } } destinationReticleTransform.gameObject.SetActive(false); invalidReticleTransform.gameObject.SetActive(false); }