ARKit Session Paused and Not Resuming

前端 未结 4 1361
小蘑菇
小蘑菇 2020-12-06 12:04

In my ARKit app I am presenting a modal window. When I close the modal and go back to the ARSCNView then I find out that the session is paused due to this code:

<         


        
4条回答
  •  心在旅途
    2020-12-06 12:52

    Not sure why your session isn't resuming, but... this generally isn't a situation you want to be in anyway.

    Notice in the readme that ships with Apple's ARKit sample code (attached to the WWDC17 session on ARKit):

    Avoid interrupting the AR experience. If the user transitions to another fullscreen UI in your app, the AR view might not be an expected state when coming back.

    Use the popover presentation (even on iPhone) for auxiliary view controllers to keep the user in the AR experience while adjusting settings or making a modal selection. In this example, the SettingsViewController and VirtualObjectSelectionViewController classes use popover presentation.

    To go into a bit more detail: if you pause the session, it won't be tracking the world while your user is away in a different fullscreen view controller. That means that when you resume, any virtual content placed in the scene won't be in the positions (relative to the camera) where you left it.

提交回复
热议问题