A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/googlevr/gvr-unity-sdk/issues/918 below:

After destroying a GVRKeyboard component, adding a new one will crash Unity · Issue #918 · googlevr/gvr-unity-sdk · GitHub

Summary:
Exactly as the title says.

Found using:

Steps to reproduce the issue:

  1. Add a GVRKeyboard component to a GameObject in a scene.
  2. Destroy that GameObject or GVRKeyboard component.
  3. Add another GVRKeyboard component to a GameObject in a scene.
  4. Unity will crash.

Workarounds:

--- a/Assets/GoogleVR/Scripts/Keyboard/GvrKeyboard.cs
+++ b/Assets/GoogleVR/Scripts/Keyboard/GvrKeyboard.cs
@@ -131,6 +131,8 @@ public class GvrKeyboard : MonoBehaviour {

   void OnDestroy() {
     instance = null;
+
+    threadSafeCallbacks.Clear();
   }

   // Use this for initialization.

The above will make everything work again.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4