We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a9d7ff commit 2e68f68Copy full SHA for 2e68f68
1 file changed
OSVR-Unity/Assets/OSVRUnity/src/ClientKit.cs
@@ -82,11 +82,24 @@ void FixedUpdate()
82
contextObject.update();
83
}
84
85
+ void Stop()
86
+ {
87
+ if (null != contextObject)
88
89
+ Debug.Log("Shutting down OSVR.");
90
+ contextObject.Dispose();
91
+ contextObject = null;
92
+ }
93
94
+
95
void OnDestroy()
96
{
- Debug.Log("Shutting down OSVR.");
- contextObject.Dispose ();
- contextObject = null;
97
+ Stop();
98
99
100
+ void OnApplicationQuit()
101
102
103
104
105
0 commit comments