Spelunx Cavern SDK
Loading...
Searching...
No Matches
BodyTrackerManagerInspector.cs
Go to the documentation of this file.
1
using
UnityEditor;
2
using
UnityEngine;
3
using
System.Collections.Generic;
4
5
namespace
Spelunx.Orbbec
{
6
[CustomEditor(typeof(BodyTrackerManager))]
7
public
class
BodyTrackerManagerInspector
: Editor {
8
public
override
void
OnInspectorGUI
() {
9
DrawDefaultInspector();
10
11
BodyTrackerManager
bodyTrackerManager = (
BodyTrackerManager
)target;
12
List<string> foundSerials = bodyTrackerManager.
GetAvailableSerials
();
13
14
GUIStyle headerStyle =
new
GUIStyle(GUI.skin.label);
15
headerStyle.fontStyle = FontStyle.Bold;
// Bold the header.
16
headerStyle.fontSize += 4;
// Slightly increase the font size.
17
GUILayout.Space(8);
// Leave some padding.
18
if
(0 == foundSerials.Count) {
19
GUILayout.Label(
"No Devices Found (Enter Play Mode to scan for devices.)"
, headerStyle);
20
}
else
{
21
GUILayout.Label(
"Devices Found (Selecting also copies serial number to clipboard.)"
, headerStyle);
22
}
23
24
for
(
int
i = 0; i < foundSerials.Count; ++i) {
25
if
(GUILayout.Button(
"Select Device "
+ foundSerials[i])) {
26
EditorGUIUtility.systemCopyBuffer = foundSerials[i];
27
bodyTrackerManager.
SetDeviceSerial
(foundSerials[i]);
28
}
29
}
30
}
31
}
32
}
Spelunx.Orbbec.BodyTrackerManagerInspector
Definition:
BodyTrackerManagerInspector.cs:7
Spelunx.Orbbec.BodyTrackerManagerInspector.OnInspectorGUI
override void OnInspectorGUI()
Definition:
BodyTrackerManagerInspector.cs:8
Spelunx.Orbbec.BodyTrackerManager
Manager class to pass data from FrameDataProvider to BodyTracker.
Definition:
BodyTrackerManager.cs:13
Spelunx.Orbbec.BodyTrackerManager.GetAvailableSerials
List< string > GetAvailableSerials()
Definition:
BodyTrackerManager.cs:37
Spelunx.Orbbec.BodyTrackerManager.SetDeviceSerial
void SetDeviceSerial(string deviceSerial)
Definition:
BodyTrackerManager.cs:35
Spelunx.Orbbec
Definition:
BodyTrackerInspector.cs:4
CavernSDK
Packages
com.spelunx.cavern.orbbec.sdk
Editor
Inspectors
BodyTrackerManagerInspector.cs
Generated by
1.9.6