/// <summary> /// gaze が外れた瞬間に呼ばれる /// </summary> public void OnFocusExit(PointerSpecificEventData eventData) { for (int i = 0; i < this.defaultMaterials.Length; i++) { this.SetColorWithEmissionGamma(this.defaultMaterials[i], 0f); } }
/// <summary> /// Handle on focus exit events from IPointerSpecificFocusable. /// </summary> public void OnFocusExit(PointerSpecificEventData eventData) { if (!isDisabled) { // If we require gaze, we should always reset the state and send a canceled if currently pressed. if (RequireGaze) { if (ButtonState == ButtonStateEnum.Pressed) { DoButtonCanceled(); } OnStateChange(handVisible ? ButtonStateEnum.Interactive : ButtonStateEnum.Observation); } // If we don't require gaze, we should only reset if we aren't currently in a pressed state. else if (ButtonState != ButtonStateEnum.Pressed) { OnStateChange(handVisible ? ButtonStateEnum.Interactive : ButtonStateEnum.Observation); } focused = false; eventData.Use(); } }
protected override void FocusExit(GameObject obj, PointerSpecificEventData eventData) //quand le curseur quitte le bouton { if (preview.activeSelf) { preview.SetActive(false); //si la prévisualisation est affichée, on la masque } }
protected override void FocusEnter(GameObject obj, PointerSpecificEventData eventData) //lorsque l'on place le curseur sur le bouton { if (!preview.activeSelf) { preview.SetActive(true); //si la prévisualisation n'est pas affichée, on l'affiche } }
protected override void FocusExit(GameObject obj, PointerSpecificEventData eventData) { // Debug.Log(obj.name + " : FocusExit"); if (obj.GetComponent <DataLoader>().proteinSprite.activeSelf) { obj.GetComponent <DataLoader>().proteinSprite.SetActive(false); } }
protected override void FocusExit(GameObject obj, PointerSpecificEventData eventData) { //Debug.Log(obj.name + " : FocusExit"); ShowToolTip(obj, false); foreach (IClickHandler clickHandler in GetComponents <IClickHandler>()) { clickHandler.FocusExit(obj); } }
protected override void FocusExit(GameObject obj, PointerSpecificEventData eventData) { Debug.Log(obj.name + " : FocusExit"); if ((Behaviour)obj.GetComponent("Halo") == true) { Behaviour halo = (Behaviour)obj.GetComponent("Halo"); halo.enabled = false; } }
public void OnFocusEnter(PointerSpecificEventData eventData) { if (!CanShow) { return; } frontPlate.Active(true); infoPanel.Active(true); OnEnter.Invoke(); }
protected override void FocusExit(GameObject obj, PointerSpecificEventData eventData) { if (obj == null) { return; } Debug.Log(obj.name + " : FocusExit"); txt.text = obj.name + " : FocusExit"; obj.GetComponentInChildren <TextMesh>().text = "Test!"; }
/// <summary> /// FocusManager SendMessage("FocusEnter") receiver. /// </summary> public void OnFocusEnter(PointerSpecificEventData eventData) { if (!m_disabled) { ButtonStateEnum newState = _bHandVisible ? ButtonStateEnum.Targeted : ButtonStateEnum.ObservationTargeted; this.OnStateChange(newState); _bFocused = true; } }
/// <summary> /// gaze された瞬間に呼ばれる /// </summary> public void OnFocusEnter(PointerSpecificEventData eventData) { for (int i = 0; i < this.defaultMaterials.Length; i++) { this.SetColorWithEmissionGamma(this.defaultMaterials[i], 0.02f); } if (this.audioSource != null && !this.audioSource.isPlaying) { this.audioSource.Play(); } }
/// <summary> /// Handle on focus enter events from IPointerSpecificFocusable. /// </summary> public void OnFocusEnter(PointerSpecificEventData eventData) { if (!isDisabled) { if (ButtonState != ButtonStateEnum.Pressed) { OnStateChange(handVisible ? ButtonStateEnum.Targeted : ButtonStateEnum.ObservationTargeted); } focused = true; eventData.Use(); } }
void IPointerSpecificFocusable.OnFocusExit(PointerSpecificEventData eventData) { // If visualizing, change the color back if (this.VisualizeGaze && material != null) { material.SetColor("_Color", originalColor); } // Make sure we're no longer tracking this pointer StopTracking(eventData.Pointer); // Record the Exit event RecordEvent(eventData.Pointer, TriggerType.Exit); }
/// <summary> /// Handle the pointer specific changes to fire focus enter and exit events /// </summary> /// <param name="pointer">The pointer associated with this focus change.</param> /// <param name="oldFocusedObject">Object that was previously being focused.</param> /// <param name="newFocusedObject">New object being focused.</param> private void OnPointerSpecificFocusChanged(IPointingSource pointer, GameObject oldFocusedObject, GameObject newFocusedObject) { PointerSpecificEventData eventData = new PointerSpecificEventData(EventSystem.current); eventData.Initialize(pointer); if (newFocusedObject != null && Isinteractable(newFocusedObject)) { FocusEnter(newFocusedObject, eventData); } if (oldFocusedObject != null && Isinteractable(oldFocusedObject)) { FocusExit(oldFocusedObject, eventData); } }
void IPointerSpecificFocusable.OnFocusEnter(PointerSpecificEventData eventData) { // If visualizing, change the color if (this.VisualizeGaze && material != null) { material.SetColor("_Color", focusedColor); } // Record the Enter event RecordEvent(eventData.Pointer, TriggerType.Enter); // If stay tracking is enabled for this type of pointer, start tracking it if (IsEnabled(GetEventType(eventData.Pointer, TriggerType.Stay))) { StartTracking(eventData.Pointer); } }
/// <summary> /// methods associated with IInputHandler /// </summary> /// <param Name="eventData"></param> public void OnFocusEnter(PointerSpecificEventData eventData) { focusEnterTime = Time.unscaledTime; hasFocus = true; if (toolTip == null || !toolTip.gameObject.activeSelf) { switch (appearType) { case AppearType.AppearOnFocusEnter: ShowToolTip(); break; default: break; } } }
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 }
/// <summary> /// FocusManager SendMessage("FocusExit") receiver. /// </summary> public void OnFocusExit(PointerSpecificEventData eventData) { if (!m_disabled) // && FocusManager.Instance.IsFocused(this)) { if (ButtonState == ButtonStateEnum.Pressed) { DoButtonCanceled(); } ButtonStateEnum newState = _bHandVisible ? ButtonStateEnum.Interactive : ButtonStateEnum.Observation; if (RequireGaze || ButtonState != ButtonStateEnum.Pressed) { this.OnStateChange(newState); } _bFocused = false; } }
protected override void FocusExit(GameObject obj, PointerSpecificEventData eventData) { base.FocusExit(obj, eventData); switch (obj.name) { case "Model_Timeline": goTimelinePointer.SetActive(true); // Turn the Timeline pointer on break; case "ButtonMeshMazikThings": goMazikThingsParticles.SetActive(false); break; case "ButtonMeshMazikCare": goMazikCareParticles.SetActive(true); break; default: break; } }
public void OnFocusExit(PointerSpecificEventData eventData) { frontPlate.Active(false); infoPanel.Active(false); OnExit.Invoke(); }
protected override void FocusExit(GameObject obj, PointerSpecificEventData eventData) { Debug.Log(obj.name + " : FocusExit"); txt.text = obj.name + " : FocusExit"; }
protected override void FocusEnter(GameObject obj, PointerSpecificEventData eventData) { //Debug.Log(obj.name + " : FocusEnter"); }
public void OnFocusExit(PointerSpecificEventData eventData) { //change the material back to its original color cachedMaterial.SetColor("_Color", originalColor); }
protected override void FocusEnter(GameObject obj, PointerSpecificEventData eventData) { txt.text = obj.name; }
protected virtual void FocusExit(GameObject obj, PointerSpecificEventData eventData) { }
public void OnFocusExit(PointerSpecificEventData eventData) { focusExitTime = Time.unscaledTime; hasFocus = false; }
public void OnFocusExit(PointerSpecificEventData eventData) { cachedMaterial.SetColor("_Color", originalColor); }
protected override void FocusEnter(GameObject obj, PointerSpecificEventData eventData) { Debug.Log("FocusEnter:" + obj.name); }
protected override void FocusExit(GameObject obj, PointerSpecificEventData eventData) { txt.text = " "; }
public void OnFocusEnter(PointerSpecificEventData eventData) { cachedMaterial.SetColor("_Color", FocusedColor); }