RealDocs

APawn::UpdateNavigationRelevance

function Engine Since 4.0
#include "GameFramework/Pawn.h"
Access: public Specifiers: virtual

Description

Override to propagate the `bCanAffectNavigationGeneration` flag to the relevant components when it changes at runtime. The base implementation does nothing.

Caveats & Gotchas

  • You must override this in your Pawn subclass if it owns components that should affect navmesh generation — the default implementation is a no-op, so nothing will actually update without your override.
  • Only has an effect at runtime if runtime navigation generation is enabled in Project Settings. Changes in a cooked/baked navmesh build are ignored.

Signature

virtual void UpdateNavigationRelevance()

Return Type

void

Example

Propagate nav relevance to mesh component C++
void AMyPawn::UpdateNavigationRelevance()
{
	Super::UpdateNavigationRelevance();
	if (MeshComponent)
	{
		MeshComponent->SetCanEverAffectNavigation(bCanAffectNavigationGeneration);
	}
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.