Ensure condition failed: MyNavData

I’m hitting this error when I place an AI unit in the world, but don’t include a navmesh. I don’t need a navmesh for this AI unit. Is there a proper way to handle this situation?

Ensure condition failed: MyNavData [File:C:\UnrealEngine\UnrealEngine\Engine\Source\Runtime\AIModule\Private\Navigation\PathFollowingComponent.cpp] [Line: 511]

Thanks!

Your crash comes right after this line:

GetWorld()->GetNavigationSystem()->GetNavDataForProps(NavAgentProps);

And that code is invoked only if you’re using a movement component with a Nav Agent configured for your Pawn/Character. At a glance, it crashes because the Nav Agent is not able to find the data it needs to configure itself.

You said you don’t need a navmesh so just derive your AI from a simple Pawn (with no Nav agents/etc configured) or if you really need to use a Character find out where the Nav Agent that causes the crash is setup (most likely in the Character Movement Component) and try to disable it. I don’t use the native navigation system much so I’m not able to tell you exactly where to configure/disable these settings!