Tanoda
ReceiverScript_Example.cs
Go to the documentation of this file.
1
/******************************************************************************
2
* Copyright (C) Ultraleap, Inc. 2011-2020. *
3
* *
4
* Use subject to the terms of the Apache License 2.0 available at *
5
* http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6
* between Ultraleap and you, your company or other organization. *
7
******************************************************************************/
8
9
using
Leap
.
Unity
.
Attributes
;
10
using
System.Collections;
11
using
System.Collections.Generic;
12
using
UnityEngine
;
13
14
public
class
ReceiverScript_Example
: MonoBehaviour {
15
16
private
Material _materialInstance;
17
18
[
EditTimeOnly
, SerializeField]
19
private
Color
_currentColor;
20
public
Color
currentColor
{
21
get
{
return
_currentColor; }
22
set
{
23
if
(_materialInstance !=
null
) {
24
_materialInstance.color = value;
25
_currentColor = value;
26
}
27
}
28
}
29
30
private
void
Start() {
31
_materialInstance = GetComponent<Renderer>().material;
32
currentColor
=
Color
.white;
33
}
34
35
public
void
SetColorEvent
(
object
colorArg) {
36
currentColor
= (
Color
)colorArg;
37
}
38
39
}
Color
UnityEngine.Color Color
Definition:
TestScript.cs:32
Leap.Unity.Attributes.EditTimeOnly
Definition:
EditTimeOnly.cs:15
ReceiverScript_Example
Definition:
ReceiverScript_Example.cs:14
ReceiverScript_Example.currentColor
Color currentColor
Definition:
ReceiverScript_Example.cs:20
ReceiverScript_Example.SetColorEvent
void SetColorEvent(object colorArg)
Definition:
ReceiverScript_Example.cs:35
Leap.Unity.Attributes
Definition:
CombinablePropertyDrawer.cs:16
Leap.Unity
Definition:
AssetFolderPropertyDrawer.cs:15
Leap
Definition:
AssetFolderPropertyDrawer.cs:15
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Plugins
LeapMotion
Experimental
HierarchyRecording
Examples
Events
ReceiverScript_Example.cs
Generated by
1.9.3