Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Bug Issue with Oculus Overlay Keyboard in Non-VR Android Build

Discussion in 'UGUI & TextMesh Pro' started by dan_soqqle, Mar 15, 2024.

  1. dan_soqqle

    dan_soqqle

    Joined:
    Feb 2, 2022
    Posts:
    114
    Hello Community,

    *edit* confirmed it has to do with the installation of the below (probably core), per my tests in a new unity project. https://assetstore.unity.com/packages/tools/integration/meta-xr-core-sdk-269169 or
    https://assetstore.unity.com/packages/tools/integration/meta-xr-haptics-sdk-272446

    Upon adding the 'required' (below) - it works. BUT, after i build and push it into android store, all the devices are rejected because no mobile device is picked up as supporting oculus.software.overlay_keyboard. So this is completely stuck and is a breaker for now.

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


    ***

    I'm currently facing an issue while building an application (with XR integration) for Android, target using Unity. Despite not targeting Oculus or VR platforms, I'm encountering an error related to the Oculus overlay keyboard when interacting with TextMeshPro input fields. It should be noted that my Unity does include com.unity.xr.oculus plugin installed (but my current build is for Android).

    The specific error message in my log is as follows:


    2024/03/15 19:14:14.274 10036 10059 Error Unity Oculus overlay keyboard is disabled, add 'oculus.software.overlay_keyboard' feature request to your Android manifest.
    2024/03/15 19:14:14.274 10036 10059 Error Unity UnityEngine.TouchScreenKeyboard:.ctor(String, TouchScreenKeyboardType, Boolean, Boolean, Boolean, Boolean, String, Int32)
    2024/03/15 19:14:14.274 10036 10059 Error Unity UnityEngine.TouchScreenKeyboard:Open(String, TouchScreenKeyboardType, Boolean, Boolean, Boolean, Boolean, String, Int32)
    2024/03/15 19:14:14.274 10036 10059 Error Unity TMPro.TMP_InputField:ActivateInputFieldInternal()
    2024/03/15 19:14:14.274 10036 10059 Error Unity TMPro.TMP_InputField:LateUpdate()


    This error occurs when attempting to focus on a TMP input field, suggesting an unexpected invocation of the Oculus keyboard functionality.

    Steps I've Taken:

    • I've ensured that the Oculus SDK and VR-related components are not included in the build. Meaning, under XR Plugin Management, Android -> Oculus is not selected
    upload_2024-3-15_20-38-26.png
    • I've attempted to exclude VR-specific features and permissions from the AndroidManifest.xml, including explicitly setting the oculus.software.overlay_keyboard feature to tools:node="remove".
    Environment:

    • Unity Version: 2022.3.15f1
    • TMP Version: 3.0.6
    Any insights or similar experiences shared would be greatly appreciated. Additionally, if there are any known workarounds or specific settings I might have overlooked, I'd be keen to learn about those as well.

    Thank you in advance for your time and help!
     
    Last edited: Mar 18, 2024
  2. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    853
  3. dan_soqqle

    dan_soqqle

    Joined:
    Feb 2, 2022
    Posts:
    114
    Thank you for your input.
    • My issue centers on the Meta XR SDK triggering Oculus functionalities, like the overlay keyboard, in non-VR Android builds. Despite using <uses-feature android:name="oculus.software.overlay_keyboard" tools:node="remove" /> in the manifest to remove the Oculus keyboard feature, TMP inputs still seem to request it, likely due to the SDK's presence.
    • Adding the Oculus keyboard feature back with <uses-feature android:name="oculus.software.overlay_keyboard" android:required="true" /> fixes the error for local Android builds but leads to a major issue: the Google Play Store then excludes all non-VR devices, mistaking the app for VR-only.

    Anyway: Confirmed a bug and this is created: https://issuetracker.unity3d.com/is...en-building-with-meta-xr-all-in-one-sdk-added Unfortunately, there isn't a clear workaround i could find.
     
    Last edited: Mar 20, 2024
    xucian likes this.