AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
CycleMaterials.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
{
12
public
class
CycleMaterials
:
CycleArray
<Material>
13
{
14
public
override
void
SetIndex
(
int
index)
15
{
16
base.SetIndex(index);
17
18
Renderer renderer = TargetObject.GetComponent<Renderer>();
19
if
(renderer != null)
20
{
21
renderer.material = Current;
22
}
23
}
24
}
25
}
HoloToolkit.Examples.Prototyping.CycleArray
CycleArray is a class for incrementing through component properties sequentially or assigning specifi...
Definition:
CycleArray.cs:15
System
HoloToolkit.Examples.Prototyping.CycleMaterials.SetIndex
override void SetIndex(int index)
Assign a specific element from the array. Place your custom logic to assign an element to TargetObjec...
Definition:
CycleMaterials.cs:14
HoloToolkit.Examples.Prototyping.CycleMaterials
sets the material of an object to a material selected in the array
Definition:
CycleMaterials.cs:12
HoloToolkit
UnityEngine
Assets
HoloToolkit-Examples
Prototyping
Scripts
CycleMaterials.cs
Generated by
1.8.12