- Home /
Question by
Eco-Editor · Aug 15, 2017 at 08:09 AM ·
navmeshnavmeshagentavatarinitializationresume
"Resume" and "SetDestination" can only be called on an active agent that has been placed on a NavMesh.
OK New day, new challenge!
How can I avoid this errors?
This is happening because, I have "rooms" settings. Room is Enabled NavMeshAgnet is ENABLED than the agent is patrolling. Room is Disabled - agent is DISABLED.
So there's a problem when I disable the room, hence disable the agent.
What is the problem?
Comment
SOLVED!!!
in Awake function:
nav$$anonymous$$eshAgent = GetComponent<Nav$$anonymous$$eshAgent>();
if (!nav$$anonymous$$eshAgent)
{
return;
}