/// <summary> /// Input source lost callback for the cursor /// </summary> /// <param name="eventData"></param> public virtual void OnSourceLost(SourceStateEventData eventData) { if (Pointer.OwnsInput(eventData)) { visibleHandsCount--; if (visibleHandsCount == 0) { IsHandVisible = false; IsInputSourceDown = false; } } }
public void OnSourceLost(SourceStateEventData eventData) { if (currentInputSource != null && eventData.SourceId == currentInputSourceId) { if (RepositionManager.Instance.GetWallStatusMode(instanceId) == WallStatusModes.DRAGGING) { // Remove self as a modal input handler //InputManager.Instance.PopModalInputHandler(); InputManager.Instance.RemoveMultiModalInputHandler(currentInputSourceId); RepositionManager.Instance.SetWallMode(gameObject, WallStatusModes.LOCKED); } } }
private void InitializeEventDatas() { inputEventData = new InputEventData(EventSystem.current); sourceClickedEventData = new InputClickedEventData(EventSystem.current); sourceStateEventData = new SourceStateEventData(EventSystem.current); manipulationEventData = new ManipulationEventData(EventSystem.current); navigationEventData = new NavigationEventData(EventSystem.current); holdEventData = new HoldEventData(EventSystem.current); #if UNITY_WSA || UNITY_STANDALONE_WIN speechKeywordRecognizedEventData = new SpeechKeywordRecognizedEventData(EventSystem.current); dictationEventData = new DictationEventData(EventSystem.current); #endif }
private void InitializeEventDatas() { inputEventData = new InputEventData(EventSystem.current); sourceClickedEventData = new InputClickedEventData(EventSystem.current); sourceStateEventData = new SourceStateEventData(EventSystem.current); sourceRotationEventData = new SourceRotationEventData(EventSystem.current); sourcePositionEventData = new SourcePositionEventData(EventSystem.current); manipulationEventData = new ManipulationEventData(EventSystem.current); navigationEventData = new NavigationEventData(EventSystem.current); holdEventData = new HoldEventData(EventSystem.current); pointerSpecificEventData = new PointerSpecificEventData(EventSystem.current); inputPositionEventData = new InputPositionEventData(EventSystem.current); selectPressedEventData = new SelectPressedEventData(EventSystem.current); }
private void InitializeEventDatas() { inputEventData = new InputEventData(EventSystem.current); sourceClickedEventData = new InputClickedEventData(EventSystem.current); sourceStateEventData = new SourceStateEventData(EventSystem.current); manipulationEventData = new ManipulationEventData(EventSystem.current); navigationEventData = new NavigationEventData(EventSystem.current); holdEventData = new HoldEventData(EventSystem.current); gamePadEventData = new GamePadEventData(EventSystem.current); xboxControllerEventData = new XboxControllerEventData(EventSystem.current); #if UNITY_WSA || UNITY_STANDALONE_WIN speechEventData = new SpeechEventData(EventSystem.current); dictationEventData = new DictationEventData(EventSystem.current); #endif }
private void InitializeEventDatas() { inputEventData = new InputEventData(EventSystem.current); sourceClickedEventData = new InputClickedEventData(EventSystem.current); sourceStateEventData = new SourceStateEventData(EventSystem.current); manipulationEventData = new ManipulationEventData(EventSystem.current); navigationEventData = new NavigationEventData(EventSystem.current); holdEventData = new HoldEventData(EventSystem.current); pointerSpecificEventData = new PointerSpecificEventData(EventSystem.current); inputPositionEventData = new InputPositionEventData(EventSystem.current); selectPressedEventData = new SelectPressedEventData(EventSystem.current); sourceRotationEventData = new SourceRotationEventData(EventSystem.current); sourcePositionEventData = new SourcePositionEventData(EventSystem.current); xboxControllerEventData = new XboxControllerEventData(EventSystem.current); #if UNITY_WSA || UNITY_STANDALONE_WIN speechEventData = new SpeechEventData(EventSystem.current); dictationEventData = new DictationEventData(EventSystem.current); #endif }
public void OnSourceLost(SourceStateEventData eventData) { //should be functionally the same as input up for our cases, modulo the datatype //update the input sources this.currentInputSources.Remove(eventData.SourceId); this.handsPositions.Remove(eventData.SourceId); if (this.currentInputSources.Count == 0) { StopDragging(); } else if (this.currentInputSources.Count == 1) { StopScaling(); StartDragging(); //TODO: this isn't restarting dragging for some reason } else { throw new Exception("OH MY GOD YOU HAVE THREE HANDS AGAIN WHY!!!"); } }
public void OnSourceLost(SourceStateEventData eventData) { throw new NotImplementedException(); }
public void OnSourceDetected(SourceStateEventData eventData) { // Nothing to do }
public void OnSourceLost(SourceStateEventData eventData) { StopRotation(); }
void ISourceStateHandler.OnSourceDetected(SourceStateEventData eventData) { // Nothing to do on source detected. }
/// <summary> /// Input source detected callback for the cursor /// </summary> /// <param name="eventData"></param> public virtual void OnSourceDetected(SourceStateEventData eventData) { visibleHandsCount++; IsHandVisible = true; }
public void OnSourceDetected(SourceStateEventData eventData) { }
public virtual void OnSourceDetected(SourceStateEventData eventData) { // Override and name your GamePad source. }
public virtual void OnSourceLost(SourceStateEventData eventData) { GamePadName = string.Empty; }
public void OnSourceLost(SourceStateEventData eventData) { RemoveSourceIdFromHandMap(eventData.SourceId); UpdateStateMachine(); eventData.Use(); }
public void OnSourceLost(SourceStateEventData eventData) { if (currentInputSource != null && eventData.SourceId == currentInputSourceId) { StopDragging(); } }
/// <summary> /// Input source lost callback for the cursor /// </summary> /// <param name="eventData"></param> public virtual void OnSourceLost(SourceStateEventData eventData) { visibleHandsCount--; if (visibleHandsCount == 0) { IsHandVisible = false; } }