Search Issue Tracker

Won't Fix

Votes

20

Found in

2017.1.0p4

Issue ID

977006

Regression

No

[NavMesh] RuntimeNavMeshBuilder: Source mesh Combined Mesh does not allow read access when Batching Static is turned on

AI

-

Only reproducible with runtime navmesh components from https://github.com/Unity-Technologies/NavMeshComponents.
Steps to reproduce:
1. Open user attached project
2. Hit the play button
3. Observe the "RuntimeNavMeshBuilder: Source mesh Combined Mesh (root: scene) does not allow read access" error
4. Disable Batching Static on all static objects.
5. Press Play
6. Observe the scene is properly playing

Expected result: RuntimeNavMeshBuilder: Source mesh Combined Mesh (root: scene) does not allow read access should not be outputted when static batching is enabled on an object

Reproduced in: 2018.1.0b1, 2017.3.0f3, 2017.2.1p1, 2017.1.2p3, 5.6.5f1

  1. Response avatar

    Resolution Note (2021.2.X):

    Combined meshes that are the result of static batching are optimized for rendering and unfortunately cannot be taken into consideration for building the NavMesh while the game is running in a standalone player.

    In the Editor the NavMesh can still be baked even in that situation because their unoptimized data can still be accessed, but the warning informs users about the fact that this will not produce the desired result in a standalone player.

Comments (9)

  1. 5b0104bc2b6d9e910420c8b66f28dc8a?d=mm

    kevinbeltranx

    Sep 17, 2020 04:18

    I had the same exact issue, and I was able to resolve it by deselecting "Static Batching" in the Player Settings->Other Settings in Project Settings.

  2. 6a7111311b36d615286727064de30e6d?d=mm

    JoseeY

    Jul 30, 2020 04:22

    Unity 2019.4.2f1, error still existing, the OnEneable and Awake method doesn't work for me, im creating the level in runtime. Please help

  3. Aa6947739697172e24de2c7097b3fdf9?d=mm

    Griffo

    Mar 26, 2019 08:21

    Still here in 2018.3.0f2 :( Not good as I want to generate the nav mesh after I've built the level at runtime, so Awake and OnEnable is not a fix for me.

  4. F4697385b17a67e0387ea41cf46384db?d=mm

    Naduct

    Dec 12, 2018 21:19

    Issue still present in 2018.2.18f1.
    SNUGSOUND's solution with updating nav mesh in OnEnable rather than Start is still viable.

  5. 49121e2adbb2b53bc3141fa0cadc873f?d=mm

    alexman

    Oct 21, 2018 10:38

    Thanks SNUGSOUND, I experienced the same issue when calling nav mesh build via Start(), changing it to called from OnEnable solved the issue

  6. 2605b29b7b080293491dad330a760d4e?d=mm

    phobos2077

    Jun 08, 2018 12:12

    Issue still exists in 2018.1.3f1

  7. F72aa96dae62282aff699325d581fd27?d=mm

    purpl3grape

    Jun 07, 2018 20:21

    On Awake() is also a viable option to call Navmesh.Build(), but yes, anything after and including Start() will trigger the crash at the moment.

  8. 9035a64ea73af4eb8036bfa4b5c820fb?d=mm

    snugsound

    Mar 25, 2018 11:18

    Edit to the above: this got me past the issue in the editor, but won't work for standalone builds as static batching happens when building.

  9. 9035a64ea73af4eb8036bfa4b5c820fb?d=mm

    snugsound

    Jan 24, 2018 01:37

    FYI I ran into this same issue with LocalNavMeshBuilder. It seems like it comes down to execution order: updating the nav mesh in OnEnable instead of Start fixed the issue for me. I would speculate that Unity's static batching initialization happens between OnEnable and Start.

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.