Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug No input after AR scene gets unloaded

Discussion in 'AR' started by Vinny-the-true, Mar 11, 2022.

  1. Vinny-the-true


    Nov 28, 2016

    We're currently developping an AR mobile app using ARFoundation.

    Our app doesn't use AR all the time. So we have a main root scene that doesn't contain any AR related stuff, which is loaded all the time. When the user triggers something that needs AR, we load the AR specific scene, containing all AR Camera and AR related objects you'd expect, on mobiles the user is asked to download some google stuff, works like a charm on compatible devices.

    So fare so good ! Except, one little thing, and I can't find out why, when that scene gets unload, and only then, the input no longer works in the canvas. Since we have only canvas interaction in the main scene, I can't really tell if only canvas are affected...

    - At first, as the subscene contained an Event Handler as well, I removed it, nothing changed
    - I still get the input logs when I touch the screen, but I think there is nothing relevant in the logcat there, but the input itself is still received somehow by Unity (ie
    D ViewRootImpl@1815617[UnityPlayerActivity]: ViewPostImeInputStage processPointer 1)
    - as we always need a camera, the root scene contains a regular camera which gets disabled when loading the AR scene, and reenabled when the AR scene has been unloaded. Visually, everything seems to work
    - tests were performed on various Android devices, even too old to be ARCore compatible, same issue everywhere.
    - if only this would happen on Android devices, in the Editor, works perfectly (for the input part at least obviously)

    Any one has faced this ? Any advice or idea where I could check ?
  2. todds_unity


    Unity Technologies

    Aug 1, 2018