SceneReconstruction alongside WorldTracking silently fails?

Hello, I've noticed that when I have my ARSession run the sceneReconstruction provider and the world tracking provider at the same time, I receive no scene reconstruction mesh updates. My catch closure doesn't receive any errors, it just doesn't send anything to the async list.

If I run just the scene reconstruction provider by itself, then I do get mesh updates.

Is this a bug? Is it expected that it's not possible to do this?

Thank you

Replies

It is possible to run multiple providers running in parallel. One possibility that comes to my mind is that maybe you have two async for await loops in one Task? E.g.

Task { 
    try! await session.run([worldTracking, sceneReconstruction])

    for await update in worldTracking.anchorUpdates {
        // Process world anchor updates.
        // Note: The `await` suspends the task after every world anchor update.
    }

    for await update in sceneReconstruction.anchorUpdates {
        // Process mesh anchor updates.
        // Note: This loop will only execute after the world tracking provider's `anchorUpdates` sequence has ended.
    }
}