MaxstARSDK
3.5.0
SensorDevice.cs
1
/*==============================================================================
2
Copyright 2017 Maxst, Inc. All Rights Reserved.
3
==============================================================================*/
4
5
using
UnityEngine
;
6
using
System
;
7
using
System
.Linq;
8
using
System
.Runtime.InteropServices;
9
10
namespace
maxstAR
11
{
15
public
class
SensorDevice
16
{
17
private
static
SensorDevice
instance = null;
18
23
public
static
SensorDevice
GetInstance
()
24
{
25
if
(instance == null)
26
{
27
instance =
new
SensorDevice
();
28
}
29
return
instance;
30
}
31
32
private
SensorDevice
()
33
{
34
}
35
39
public
void
Start
()
40
{
41
if
(Application.platform == RuntimePlatform.IPhonePlayer)
42
{
43
NativeStaticAPI
.startSensor();
44
}
45
else
46
{
47
NativeSharedAPI
.startSensor();
48
}
49
}
50
54
public
void
Stop
()
55
{
56
if
(Application.platform == RuntimePlatform.IPhonePlayer)
57
{
58
NativeStaticAPI
.stopSensor();
59
}
60
else
61
{
62
NativeSharedAPI
.stopSensor();
63
}
64
}
65
}
66
}
maxstAR.SensorDevice
Control device sensor
Definition:
SensorDevice.cs:15
maxstAR.NativeSharedAPI
Definition:
NativeSharedAPI.cs:11
System
maxstAR
Definition:
AbstractARManager.cs:9
maxstAR.SensorDevice.Start
void Start()
Start device sensor
Definition:
SensorDevice.cs:39
maxstAR.NativeStaticAPI
Definition:
NativeStaticAPI.cs:11
maxstAR.SensorDevice.Stop
void Stop()
Stop device sensor
Definition:
SensorDevice.cs:54
maxstAR.SensorDevice.GetInstance
static SensorDevice GetInstance()
Get a SensorDevice instance.
Definition:
SensorDevice.cs:23
UnityEngine
Generated by
1.8.14