protected override void Awake() { base.Awake(); Impl = new GvrPointerInputModuleImpl(); EventExecutor = new GvrEventExecutor(); UpdateImplProperties(); }
protected override void Awake() { UnityEngine.XR.XRSettings.enabled = true; base.Awake(); Impl = new GvrPointerInputModuleImpl(); EventExecutor = new GvrEventExecutor(); UpdateImplProperties(); }
private void RemoveListeners() { GvrEventExecutor executor = GvrPointerInputModule.FindEventExecutor(); if (executor == null) { return; } executor.OnPointerClick -= OnPointerClick; }
private void RemoveListeners() { GvrEventExecutor eventExecutor = GvrPointerInputModule.FindEventExecutor(); if (eventExecutor == null) { return; } eventExecutor.OnPointerClick -= OnPointerClickHandler; eventExecutor.OnPointerDown -= OnPointerDownHandler; eventExecutor.OnPointerUp -= OnPointerUpHandler; eventExecutor.OnPointerEnter -= OnPointerEnterHandler; eventExecutor.OnPointerExit -= OnPointerExitHandler; }
private void AddListeners() { GvrEventExecutor eventExecutor = GvrPointerInputModule.FindEventExecutor(); if (eventExecutor == null) { return; } eventExecutor.OnPointerClick += OnPointerClickHandler; eventExecutor.OnPointerDown += OnPointerDownHandler; eventExecutor.OnPointerUp += OnPointerUpHandler; eventExecutor.OnPointerEnter += OnPointerEnterHandler; eventExecutor.OnPointerExit += OnPointerExitHandler; }
void Start() { _trigger = GetComponent <EventTrigger>(); EventTrigger.Entry entry = new EventTrigger.Entry(); entry.eventID = EventTriggerType.PointerDown; entry.callback.AddListener((data) => OnClick()); _trigger.triggers.Add(entry); EventTrigger.Entry entry2 = new EventTrigger.Entry(); entry2.eventID = EventTriggerType.PointerUp; entry2.callback.AddListener((data) => OnExit()); _trigger.triggers.Add(entry2); rb = GetComponent <Rigidbody>(); GvrEventExecutor eventExecutor = GvrPointerInputModule.FindEventExecutor(); eventExecutor.OnPointerClick += OnItemInterract; }