OSVR / OSVR-Unity

Package for authoring OSVR experiences with Unity.
Apache License 2.0
99 stars 38 forks source link

Various fixes for scene loading #137

Closed demonixis closed 8 years ago

demonixis commented 8 years ago

Hi, in my works to try to understand why the HMD crashes when we switch to another scene, I have started to do some refactoring/optimization.

First of all, this code is used in a real project already in production on multiple environements (PC, Android, Web)

Using a string for Start/StopCoroutine is not very good for performances (check the Unity docs), so I used a variable to store a reference to the EndOfFrame method.

Finally it is not necessary to spam the console if the ClientKit object is not present on the scene, so I added another flag to display a message one time only.

DuFF14 commented 8 years ago

looks good, thanks