AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
CycleShowHideObjects.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
System
.Collections;
6
7
namespace
HoloToolkit
.Examples.Prototyping
8
{
13
public
class
CycleShowHideObjects
:
CycleArray
<GameObject>
14
{
19
public
override
void
SetIndex
(
int
index)
20
{
21
base.SetIndex(index);
22
23
for
(
int
i = 0; i < Array.Length; ++i)
24
{
25
GameObject item = Array[i];
26
27
if
(item != null)
28
{
29
item.SetActive(i == Index);
30
}
31
}
32
}
33
}
34
}
HoloToolkit.Examples.Prototyping.CycleArray
CycleArray is a class for incrementing through component properties sequentially or assigning specifi...
Definition:
CycleArray.cs:15
HoloToolkit.Examples.Prototyping.CycleShowHideObjects
Activate and deactivate objects based on the selected item in the array. Only shows the currently sel...
Definition:
CycleShowHideObjects.cs:13
HoloToolkit.Examples.Prototyping.CycleShowHideObjects.SetIndex
override void SetIndex(int index)
Show the item by index and hide all others
Definition:
CycleShowHideObjects.cs:19
System
HoloToolkit
UnityEngine
Assets
HoloToolkit-Examples
Prototyping
Scripts
CycleShowHideObjects.cs
Generated by
1.8.12