OSVR / OSVR-Unity

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

- Crash fix where loading a new unity scene… #138

Closed chase-cobb closed 8 years ago

chase-cobb commented 8 years ago

… that already contains a ClientKit game object would crash the hmd.

OSVR-Unity Issue 127

chase-cobb commented 8 years ago

The fix was tested in the Unity samples project It resolved the crash on loading scenes that have an existing instance of ClientKit. The FindObjectOfType calls were replaced with the singleton instance property to avoid ordering issues. Otherwise it's possible for objects in Awake to find the user placed instance, which is then deleted by ClientKit and was causing null reference exceptions.

DuFF14 commented 8 years ago

Great, thanks! Glad to see this issue go away.

chase-cobb commented 8 years ago

Absolutely!