Page 1 of 1

AutoSave: Navmesh Agent - set destination

Posted: Wed May 05, 2021 8:49 am
by AdamStepinski
I try to save Navmesh Agent's destination using AutoSave

When I load an AutoSave file, I get error "SetDestination" can only be called on an active agent that has been placed on a NavMesh, presumably because navmesh agent isn't active yet

Can you help me?

PS. Thanks for all your work you do

Re: AutoSave: Navmesh Agent - set destination

Posted: Wed May 05, 2021 9:06 am
by Joel
Hi there, and thanks for getting in contact.

As this is an issue with how NavMeshes work rather than serialization, and isn't a type that we explicitly support, I recommend getting in touch with Unity regarding this. They should be able to provide more information on why this error is thrown and how to avoid it.

All the best,
Joel

Re: AutoSave: Navmesh Agent - set destination

Posted: Fri May 07, 2021 6:01 am
by AdamStepinski
OK got it working

the solution was to load scene with navmesh first, then to load (using AutoSave) navmeshAgents after one frame

apparently this error was on my side

thanks for support