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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Add comment