Search Issue Tracker
By Design
Votes
0
Found in
2017.3.0p1
Issue ID
992264
Regression
No
[NavMesh] currentOffMeshLinkData.offMeshLink always returns null even when agent is on OffMeshLink
To reproduce:
1. Open my project attached
2. Enter Play mode
3. Observe the console
Expected: currentOffMeshLinkData.offMeshLink returns currently used offMeshLink
Actual: currentOffMeshLinkData.offMeshLink returns null (check .gif attached)
Reproduced in: 2017.2.2p1, 2017.3.1p4, 2018.1.0b11, 2018.2.0a4
Note1: isOnOffMeshLink() does return true when agent is on OffMeshLink
Note2: attached two project versions - one with 2017.1 NavMesh components, other with 2018.1
Note3: NavMesh components were throwing multiple errors when opening in 2017.1.3p2, despite being meant to be used with 2017.1
GitHub link: https://github.com/Unity-Technologies/NavMeshComponents/tree/2017.1
---
The `navMeshOwner` property of the agent can be used for retrieving the current NavMesh component that the agent is on. In the case of a NavMeshLink the code looks like this:
var link = (UnityEngine.AI.NavMeshLink)agent.navMeshOwner;
if (link)
{
...
}
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Symlinks are broken when a package which contains .xcframework + symlinks is added through Unity Package Manager.
- Crash on ApplyMaterialPass when opening a specific scene
- Memory leak when using Native Plugin in Windows IL2CPP Build
- [URP][Tutorial] Universal 3D Sample tutorial issues
- Gradle error: "...Unexpected error during link..." is thrown when building for Android and targeting API Level 34
Add comment