Search Issue Tracker

Fixed in 5.2.2

Votes

0

Found in

5.0.1f1

Issue ID

699420

Regression

Yes

Can't bake NavMesh while building Lighting

AI

-

Reproducible on 5.0, 5.1, 5.2;

Repro steps:
1. Create an empty 3D scene with a default terrain;
2. Paint something into the terrain (paint height or raise/lower terrain);
3. Automatic light mapping calculation kicks in. While it's running, go to the Navigation tab and start baking the NavMesh;

What happens:
About 50% of the time the "Cancel" button is not reset to "Bake" even when the NavMesh has or hasn't finished building (when hasn't finished, Unity just doesn't finish baking, progress bar doesn't appear in the corner). Internally this is represented by NavMeshBuilder.isRunning, which doesn't get reset either. As it only happens 50% of the time it seems to be some race condition.

What should happen:
NavMeshBuilder.isRunning must reliably reset to "false" after an asynchronous NavMesh build.

Workaround:
In the Navigation tab you can just press Cancel without losing the NavMesh. However this issue basically breaks all scripts which want to build navigation meshes as part of an editor automation as they don't have a way to know whether or not the navigation mesh building is finished and they can continue.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.