Tanoda
EventPlayableBehaviour.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
UnityEngine
;
10
using
UnityEngine
.Playables;
11
12
namespace
Leap.Unity.Recording
{
13
14
public
class
EventPlayableBehaviour
: PlayableBehaviour {
15
16
public
GameObject
recipient
;
17
public
string
message
=
"MyMethod"
;
18
public
object
argument
;
19
20
public
void
FireEvent
() {
21
if
(
recipient
==
null
) {
22
Debug
.LogError(
"Unable to fire event: Recipient is null."
);
23
return
;
24
}
25
26
if
(
argument
==
null
) {
27
//Debug.Log("Target: " + recipient.name + "; Sending message: " + message);
28
29
if
(Application.isPlaying) {
30
recipient
.SendMessage(
message
);
31
}
32
}
33
else
{
34
//Debug.Log("Target: " + recipient.name + "; Sending message: " + message
35
// + "with arg: " + argument);
36
37
if
(Application.isPlaying) {
38
recipient
.SendMessage(
message
,
argument
);
39
}
40
}
41
}
42
43
}
44
45
}
Debug
UnityEngine.Debug Debug
Definition:
TanodaServer.cs:19
Leap.Unity.Recording.EventPlayableBehaviour
Definition:
EventPlayableBehaviour.cs:14
Leap.Unity.Recording.EventPlayableBehaviour.message
string message
Definition:
EventPlayableBehaviour.cs:17
Leap.Unity.Recording.EventPlayableBehaviour.FireEvent
void FireEvent()
Definition:
EventPlayableBehaviour.cs:20
Leap.Unity.Recording.EventPlayableBehaviour.argument
object argument
Definition:
EventPlayableBehaviour.cs:18
Leap.Unity.Recording.EventPlayableBehaviour.recipient
GameObject recipient
Definition:
EventPlayableBehaviour.cs:16
Leap.Unity.Recording
Definition:
HierarchyPostProcessEditor.cs:15
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Plugins
LeapMotion
Experimental
HierarchyRecording
Scripts
Events
EventPlayableBehaviour.cs
Generated by
1.9.3