AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
ToggleDebugWindow.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
using
UnityEngine
;
4
using
HoloToolkit
.
Unity
.
InputModule
;
5
6
namespace
HoloToolkit
.Unity
7
{
11
public
class
ToggleDebugWindow
: MonoBehaviour,
IInputClickHandler
12
{
16
private
bool
debugEnabled =
false
;
17
21
public
GameObject
DebugWindow
;
22
23
private
void
Start()
24
{
25
UpdateChildren();
26
}
27
32
public
void
OnInputClicked
(
InputClickedEventData
eventData)
33
{
34
debugEnabled = !debugEnabled;
35
UpdateChildren();
36
eventData.Use();
37
}
38
42
private
void
UpdateChildren()
43
{
44
DebugWindow.SetActive(debugEnabled);
45
}
46
}
47
}
HoloToolkit.Unity.InputModule
Definition:
AnimatedCursor.cs:7
HoloToolkit.Unity.ToggleDebugWindow
Toggles if the debug window is visible or not.
Definition:
ToggleDebugWindow.cs:11
HoloToolkit.Unity.ToggleDebugWindow.OnInputClicked
void OnInputClicked(InputClickedEventData eventData)
When the user clicks this control, we toggle the state of the DebugWindow
Definition:
ToggleDebugWindow.cs:32
HoloToolkit.Unity.InputModule.IInputClickHandler
Interface to implement to react to simple click input.
Definition:
IInputClickHandler.cs:11
HoloToolkit.Unity.ToggleDebugWindow.DebugWindow
GameObject DebugWindow
The debug window.
Definition:
ToggleDebugWindow.cs:21
HoloToolkit.Unity.InputModule.InputClickedEventData
Describes an input event that involves a tap.
Definition:
InputClickedEventData.cs:11
HoloToolkit
UnityEngine
HoloToolkit.Unity
Assets
HoloToolkit
Utilities
Scripts
ToggleDebugWindow.cs
Generated by
1.8.12