Hello! I'm having an issue thrown at me when unloading a scene with a NavMeshGroupMovement.
I noticed that NavMeshMovement has a check that makes it not throw the error for me with it.
/// <summary>
/// Stop pathfinding.
/// </summary>
protected override void Stop()
{
UpdateRotation(m_StartUpdateRotation);
if (m_NavMeshAgent.hasPath) {
m_NavMeshAgent.isStopped = true;
}
}
But with NavMeshGroupMovement it does not check NavMeshAgent.hasPath:
public override void OnEnd()
{
// Disable the nav mesh
for (int i = 0; i < m_NavMeshAgents.Length; ++i) {
if (m_NavMeshAgents != null) {
m_NavMeshAgents.isStopped = true;
}
}
}
Adding a NavMeshAgent.hasPath there for the group solved for me and it seems that this should be added in a patch considering that the NavMeshMovement already uses it. I don't like to change a plugin code directly, but in this case, I did not find another solution I'm requesting this. Does this make sense?
I noticed that NavMeshMovement has a check that makes it not throw the error for me with it.
/// <summary>
/// Stop pathfinding.
/// </summary>
protected override void Stop()
{
UpdateRotation(m_StartUpdateRotation);
if (m_NavMeshAgent.hasPath) {
m_NavMeshAgent.isStopped = true;
}
}
But with NavMeshGroupMovement it does not check NavMeshAgent.hasPath:
public override void OnEnd()
{
// Disable the nav mesh
for (int i = 0; i < m_NavMeshAgents.Length; ++i) {
if (m_NavMeshAgents != null) {
m_NavMeshAgents.isStopped = true;
}
}
}
Adding a NavMeshAgent.hasPath there for the group solved for me and it seems that this should be added in a patch considering that the NavMeshMovement already uses it. I don't like to change a plugin code directly, but in this case, I did not find another solution I'm requesting this. Does this make sense?