Search Unity

ARFoundation - Delay when seeing cam on start

Discussion in 'Handheld AR' started by newguy123, Jan 8, 2019.

  1. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    158
    Hi all

    I've implemented the animated icons from the samples for "move device", then when it finds a plane it changes the icon to "tap to place model".

    The issue is, when the app starts and the icon comes up to "move device around", for 1 or 2 seconds, the camera shows BLACK, with only the icon visible, before the camera becomes active.

    When not using the icons, but my own canvas text to "move device around", it has the same delay.

    Any ideas?

    Tested on Android
     
  2. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    518
    It can take a couple of seconds for the AR session to initialize and start the camera feed, so that is the expected behavior. I'm not sure what your question is: are you asking how to reduce this startup time, or are you asking how to avoid showing the icons until the camera is visible?

    If the latter, you can subscribe to the
    ARSubsysytemManager.cameraFrameReceived
    event to know when the camera feed is working.
     
  3. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    158
    Basically I'm using the UIManager.cs, from the Master Samples github.

    How can I modify that script, to show the m_MoveDeviceAnimation only when AR has been initialised, and before that, just another png saying "loading..."?

    Currently that script immediately shows the MoveDeviceAnimation (even during that black delay I mentioned)
     
  4. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    158
    @tdmowrer Hi I'm just following up on this. I've no idea how to get this going. Could you please give me some more specific instructions please?
     
  5. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    158
    I'm again just following up on this @tdmowrer
    Your knowledge sharing is as always much appreciated.
     
  6. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    158