void URecastFilter_UseDefaultArea::InitializeFilter(const ANavigationData& NavData, const UObject* Querier, FNavigationQueryFilter& Filter) const { #if WITH_RECAST Filter.SetFilterImplementation(dynamic_cast<const INavigationQueryFilterInterface*>(ARecastNavMesh::GetNamedFilter(ERecastNamedFilter::FilterOutAreas))); #endif // WITH_RECAST Super::InitializeFilter(NavData, Querier, Filter); }
TSharedPtr<const FNavigationQueryFilter> UNavigationQueryFilter::GetQueryFilter(const ANavigationData* NavData) const { TSharedPtr<const FNavigationQueryFilter> SharedFilter = NavData->GetQueryFilter(GetClass()); if (!SharedFilter.IsValid()) { FNavigationQueryFilter* NavFilter = new FNavigationQueryFilter(); NavFilter->SetFilterImplementation(NavData->GetDefaultQueryFilterImpl()); InitializeFilter(NavData, NavFilter); SharedFilter = MakeShareable(NavFilter); ((ANavigationData*)NavData)->StoreQueryFilter(GetClass(), SharedFilter); } return SharedFilter; }