AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
BoundingBoxRigActivityExample.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 
5 using UnityEngine;
6 
7 namespace HoloToolkit.Unity.Examples.UX
8 {
10  {
12  {
13  Debug.LogFormat("{0}'s bounding box rig is activated", eventData.BoundingBoxRiggedObject.name);
14  }
15 
17  {
18  Debug.LogFormat("{0}'s bounding box rig is deactivated", eventData.BoundingBoxRiggedObject.name);
19  }
20 
21  private void Start()
22  {
23  // We have to add a global listener in this case because the focused object is the rig's app bar
24  // So, it will be the app bar which will receive the event, not this listener
25  InputManager.Instance.AddGlobalListener(gameObject);
26  }
27 
28  private void OnDestroy()
29  {
30  InputManager.Instance.RemoveGlobalListener(gameObject);
31  }
32  }
33 }
Describes activity of a bounding box rig events.
Input Manager is responsible for managing input sources and dispatching relevant events to the approp...
Definition: InputManager.cs:19
Interface to implement reacting to bounding box rig's activation or deactivation. ...
GameObject BoundingBoxRiggedObject
The bounding box rigged object.
static T Instance
Returns the Singleton instance of the classes type. If no instance is found, then we search for an in...
Definition: Singleton.cs:26