Search Issue Tracker
By Design
Votes
0
Found in
5.4.2f2
Issue ID
869943
Regression
No
NavMeshAgent is not added when loading scene from AssetBundle
Steps to reproduce:
1. Open User's attached project
2. Open scene "Main"
3. Press Play. Notice: object is moving, a magenta line is seen, in Console: m_NavMeshAgent.isOnNavMesh:True
4. Build the project
5. Open build
Result: Object is not moving, a magenta line is not seen. NavMeshAgent is not created. Player Log file outputs: m_NavMeshAgent.isOnNavMesh:False
Reproduced with: 5.6.0b5, 5.5.1f1, 5.4.4p3, 5.3.7p2.
Note: reproduced with Windows, macOS, iOS.
Workaround:
1. Create an Empty Object in your scene
2. Add a Nav Mesh Agent component to that Object
3. Build AssetBundle
By Design:
The issue is that code stripping does not know about the nav mesh in the asset bundle, so it gets stripped out in the build. Use BuildPlayerOptions struct (https://docs.unity3d.com/ScriptReference/BuildPlayerOptions.html) and set the assetBundleManifestPath property to the main asset bundle manifest file generated when asset bundles were built.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Add comment