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
;
5
using
HoloToolkit
.
Unity
.
InputModule
;
6
7
namespace
HoloToolkit
.Unity.Receivers
8
{
12
public
class
ToggleActiveReceiver
:
InteractionReceiver
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
}
HoloToolkit.Unity.InputModule
Definition:
AnimatedCursor.cs:7
HoloToolkit.Unity.Receivers.ToggleActiveReceiver.InputDown
override void InputDown(GameObject obj, InputEventData args)
When receiving the input down button toggle active/inactive all targets
Definition:
ToggleActiveReceiver.cs:19
HoloToolkit.Unity.Receivers.InteractionReceiver
An interaction receiver is simply a component that attached to a list of interactable objects and doe...
Definition:
InteractionReceiver.cs:15
HoloToolkit
HoloToolkit.Unity.Receivers.ToggleActiveReceiver
Simple receiver class for toggling a game object active or inactive.
Definition:
ToggleActiveReceiver.cs:12
HoloToolkit.Unity.InputModule.InputEventData
Describes an input event that has a source id and a press kind.
Definition:
InputEventData.cs:11
UnityEngine
HoloToolkit.Unity
Assets
HoloToolkit
UX
Scripts
Receivers
ToggleActiveReceiver.cs
Generated by
1.8.12