Unity-Technologies / XR-Interaction-Toolkit-Examples

This repository contains various examples to use with the XR Interaction Toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug][XRI 1.0.0-pre.6] Oculus System Keyboard not showing up on Input Field interaction

maskedmouse opened this issue · comments

In the readme it says it uses the Oculus System Keyboard when the input field receives focus. However, using Unity 2021.1.24 and building it for the Oculus Quest 1. The system keyboard does not activate at all. The uses-feature is already in the manifest.
Does it require additional setup like calling the TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default);? because it does not seem to handle this by default, while the readme suggests it should work.
There is no additional script on the input field so, it does not work out of the box.

I also tried updating the Oculus XR Plugin to 1.10.1-preview.3.

Edit: It does seem to work in the UI Interaction scene, just not in the world interaction demo scene.
Perhaps this is because the world interaction demo uses the regular Unity UI Input field and the UI Interaction scene uses TMPro Input Field?

Android/Oculus

A modified Android manifest file is used to enable the Oculus system keyboard when an input field receives focus, an example of which is in the WorldInteractionDemo Scene. This was done by editing the generating AndroidManifest.xml file created by first opening Edit > Project Settings > Player, clicking the Android settings tab, and then under the Build header clicking to enable Custom Main Manifest. The following line was added to the manifest element:

I'm curious about this one too. I'm not seeing it working in the UI Interaction scene (using Unity 2020.3.20).

Is there any news?

Edit: When you build the project, that's work but if you want to play on an editor or air link. It will not work.

There was a bug that was causing UGUI Text Fields to not trigger showing the system keyboard in some versions of Unity. A fix will be included in upcoming patch releases of Unity 2019.4, 2020.3, 2021.3, 2022.1, and 2022.2. Look for the following in the release notes to see if it has the fix:

XR: Fixed Oculus Quest software keyboard not showing up on InputField interaction.

Using 2020.3.46f1, the input field interaction using Oculus plugin on Quest Pro doesn't trigger the system keyboard, which patch version fixed that?

Using 2020.3.46f1, the input field interaction using Oculus plugin on Quest Pro doesn't trigger the system keyboard, which patch version fixed that?

The fix was included in 2020.3.34f1, so you should already have it.

To enable the ability for the input fields to show the system keyboard, you will need to modify a custom Android manifest file. Do that by opening Edit > Project Settings > Player, then under Publishing Settings > Build, enable Custom Main Manifest.

Then open Assets\Plugins\Android\AndroidManifest.xml and add the following to the manifest element:

<uses-feature android:name="oculus.software.overlay_keyboard" android:required="false"/>

Full modified AndroidManifest.xml example:

<?xml version="1.0" encoding="utf-8"?>
<!-- GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN-->
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.unity3d.player"
    xmlns:tools="http://schemas.android.com/tools">
    <application>
        <activity android:name="com.unity3d.player.UnityPlayerActivity"
                  android:theme="@style/UnityThemeSelector">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
        </activity>
    </application>
    <uses-feature android:name="oculus.software.overlay_keyboard" android:required="false"/>
</manifest>

If you are still having issues, I would recommend upgrading to the final 2020.3 version (2020.3.48f1).

Thanks for the example, I'll get round to creating a bug report with an apk build that shows the issue I was having - the keyboard would open but only for some reason if you were still moving the left analog stick while clicking the input field. Very strange but for the sake of future ports I used a keyboard within the UI canvas itself so that there is a keyboard that works for other platforms/OpenXR.