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
- [Android] Stage information is not logged when Log Shader Compilation is enabled
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
Add comment