admin管理员组文章数量:1336321
Our app allows a user to scan a room and then save that scan on a separate view, followed by additional scans. We're looking into allowing room combining via CapturedStructure
, so we need rooms to be scanned in the same ARWorldMap
without necessarily needing to re-localize in the same app session. This should fit within the first scenario that Apple described.
The only way I have found that allows our requirements is to save RoomCaptureView
and to re-use that RoomCaptureView
whenever we need to start a session again. This creates a number of other issues, and ideally, we wouldn't need to save a View in something like a singleton. We are using captureSession.stop(pauseARSession: false)
. Additionally, if we use the same RoomCaptureView
and an error occurs during the scanning process, we can't get the instructions overlay to appear again if we reuse this view (specifically, the instructions in the middle of the view that state "Move device to start"). It's as if the instructions are completely removed and scanning is stuck on an error state if an error occurs.
These instructions also seem to be separate from the instructions we can grab from RoomCaptureViewDelegate
via didProvide instruction: RoomCaptureSession.Instruction
, so we can't use that either. There's a couple subviews that seem relevant to this: RoomCaptureCoachingOverlayView
and ARGlyphView
- but both are not public, so we can't force them to appear. Also attempted a number of other things to try to get these subviews to appear, such as layoutIfNeeded().
Saving the ARSession
and using it in let roomCaptureView = RoomCaptureView(frame: viewBounds, arSession: arSession)
where we're creating a new view with the same ARSession
seems much more ideal as that solves the above issues, but we run into another issue: world tracking seems to be completely lost when a new RoomCaptureView
(and thus a new RoomCaptureSession
) is started, even with the same already started ARSession
, almost as if captureSession.stop(pauseARSession: false)
doesn't work as described.
Is there any way around needing to use the same RoomCaptureView
or RoomCaptureSession
for subsequent scans in the same session without needing to re-localize via ARWorldMap
loading? Is there a way to force the guiding instructions to appear?
本文标签: swiftRoomCaptureSession persistenceARSession pause brokenStack Overflow
版权声明:本文标题:swift - RoomCaptureSession persistence, ARSession pause broken? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742328472a2454205.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论