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/917 below:

GVR Keyboard Doesn't Work With IL2CPP · Issue #917 · googlevr/gvr-unity-sdk · GitHub

Summary:
When enabling IL2CPP in the newest versions of Unity with the new .NET system, if you attempt to show the GVR Keyboard, Unity will crash.

Found using:

Steps to reproduce the issue:

  1. Show the GVR Keyboard

Workarounds:

--- a/Assets/GoogleVR/Scripts/Keyboard/GvrKeyboard.cs
+++ b/Assets/GoogleVR/Scripts/Keyboard/GvrKeyboard.cs
@@ -313,6 +315,9 @@ public class GvrKeyboard : MonoBehaviour {
     }
   }

+  private delegate void KeyboardCallbackDelegate(IntPtr closure, GvrKeyboardEvent keyboardEvent);
+
+  [AOT.MonoPInvokeCallback(typeof(KeyboardCallbackDelegate))]
   private static void OnKeyboardCallback(IntPtr closure, GvrKeyboardEvent keyboardEvent) {
     lock (callbacksLock) {
       threadSafeCallbacks.Add(keyboardEvent);

The above code fixes the issue.


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