AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
ToggleActiveReceiver.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 UnityEngine;
6 
7 namespace HoloToolkit.Unity.Receivers
8 {
13  {
19  protected override void InputDown(GameObject obj, InputEventData args)
20  {
21  if (Targets.Count > 0)
22  {
23  foreach(GameObject target in Targets)
24  {
25  target.SetActive(!target.activeSelf);
26  }
27  }
28  }
29  }
30 }
override void InputDown(GameObject obj, InputEventData args)
When receiving the input down button toggle active/inactive all targets
An interaction receiver is simply a component that attached to a list of interactable objects and doe...
Simple receiver class for toggling a game object active or inactive.
Describes an input event that has a source id and a press kind.