We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4097e6d commit a421788Copy full SHA for a421788
1 file changed
OSVR-Unity/Assets/OSVRUnity/src/InterfaceCallbacks.cs
@@ -32,15 +32,31 @@ public class InterfaceCallbacks : MonoBehaviour
32
public delegate void AnalogCallback(string source, float value);
33
#endregion
34
35
- void Start()
+ #region Event methods
36
+ public void Start()
37
{
38
if (null == iface)
39
40
iface = OSVR.Unity.ClientKit.instance.context.getInterface(path);
41
}
42
43
- void OnDestroy()
44
+ public void OnDestroy()
45
+ {
46
+ Stop();
47
+ }
48
+
49
+ public void OnApplicationQuit()
50
51
52
53
54
+ #endregion
55
56
+ /// <summary>
57
+ /// Used in the end-of-life method, this can also be called manually to free the internal interface.
58
+ /// </summary>
59
+ public void Stop()
60
61
iface = null;
62
0 commit comments