Fix regression where if the navmesh was disabled on playmode beginning, the mesh would still exist in the backend.

This commit is contained in:
Menotdan
2024-04-14 01:02:48 -04:00
parent 84c1f6b5de
commit db28afb591

View File

@@ -180,7 +180,7 @@ void NavMesh::Initialize()
// Base
Actor::Initialize();
if (!_navMeshActive)
if (!_navMeshActive && IsActiveInHierarchy())
{
GetScene()->Navigation.Meshes.Add(this);
AddTiles();