AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
ButtonReceiverExample.cs
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License. See LICENSE in the project root for license information.
3 
4 using HoloToolkit.Unity;
5 using System.Collections.Generic;
6 using UnityEngine;
9 
10 namespace HoloToolkit.Unity.Examples
11 {
13  {
14  public GameObject textObjectState;
15  private TextMesh txt;
16 
17  void Start()
18  {
19  txt = textObjectState.GetComponentInChildren<TextMesh>();
20  }
21 
22  protected override void FocusEnter(GameObject obj, PointerSpecificEventData eventData) {
23  Debug.Log(obj.name + " : FocusEnter");
24  txt.text = obj.name + " : FocusEnter";
25  }
26 
27  protected override void FocusExit(GameObject obj, PointerSpecificEventData eventData) {
28  Debug.Log(obj.name + " : FocusExit");
29  txt.text = obj.name + " : FocusExit";
30  }
31 
32  protected override void InputDown(GameObject obj, InputEventData eventData) {
33  Debug.Log(obj.name + " : InputDown");
34  txt.text = obj.name + " : InputDown";
35  }
36 
37  protected override void InputUp(GameObject obj, InputEventData eventData) {
38  Debug.Log(obj.name + " : InputUp");
39  txt.text = obj.name + " : InputUp";
40  }
41  }
42 }
Event dispatched associated with a specific pointer.
override void FocusExit(GameObject obj, PointerSpecificEventData eventData)
override void FocusEnter(GameObject obj, PointerSpecificEventData eventData)
override void InputUp(GameObject obj, InputEventData eventData)
An interaction receiver is simply a component that attached to a list of interactable objects and doe...
override void InputDown(GameObject obj, InputEventData eventData)
Describes an input event that has a source id and a press kind.