You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
One problematic scenario is when all components from an actor are unregistered and one of them is the navigation parent of the others. In this case, the parent may be unregistered before some of its children and then calls to UpdateNavOctreeParentChain from a child may queue back the unregistered parent. UpdateNavOctreeParentChain will now consider the actual status of the parent (Added or queued for add) before registering it or its children. [at]mieszko.zielinski [at]guillaume.guay #rb mieszko.zielinski, guillaume.guay #ROBOMERGE-SOURCE: CL 8552772 via CL 8557168 #ROBOMERGE-BOT: (v406-8472469) [CL 8557314 by yoan stamant in Main branch]
38 lines
2.2 KiB
C
38 lines
2.2 KiB
C
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
#include "NavigationOctreeController.h"
|
|
#include "NavigationDirtyAreasController.h"
|
|
|
|
|
|
struct NAVIGATIONSYSTEM_API FNavigationDataHandler
|
|
{
|
|
FNavigationOctreeController& OctreeController;
|
|
FNavigationDirtyAreasController& DirtyAreasController;
|
|
|
|
FNavigationDataHandler(FNavigationOctreeController& InOctreeController, FNavigationDirtyAreasController& InDirtyAreasController);
|
|
|
|
void RemoveNavOctreeElementId(const FOctreeElementId& ElementId, int32 UpdateFlags);
|
|
FSetElementId RegisterNavOctreeElement(UObject& ElementOwner, INavRelevantInterface& ElementInterface, int32 UpdateFlags);
|
|
void AddElementToNavOctree(const FNavigationDirtyElement& DirtyElement);
|
|
|
|
/** Removes associated NavOctreeElement and invalidates associated pending updates. Also removes object from the list of children
|
|
* of the NavigationParent, if any.
|
|
* @param ElementOwner Object for which we must remove associated NavOctreeElement
|
|
* @param ElementInterface Object associated NavRelevantInterface to access NavigationParent when registered as children
|
|
* @param UpdateFlags Flags indicating in which context the method is called to allow/forbid certain operations
|
|
*
|
|
* @return True if associated NavOctreeElement has been removed or pending update has been invalidated; false otherwise.
|
|
*/
|
|
bool UnregisterNavOctreeElement(UObject& ElementOwner, INavRelevantInterface& ElementInterface, int32 UpdateFlags);
|
|
void UpdateNavOctreeElement(UObject& ElementOwner, INavRelevantInterface& ElementInterface, int32 UpdateFlags);
|
|
void UpdateNavOctreeParentChain(UObject& ElementOwner, bool bSkipElementOwnerUpdate = false);
|
|
bool UpdateNavOctreeElementBounds(UActorComponent& Comp, const FBox& NewBounds, const FBox& DirtyArea);
|
|
void FindElementsInNavOctree(const FBox& QueryBox, const FNavigationOctreeFilter& Filter, TArray<FNavigationOctreeElement>& Elements);
|
|
bool ReplaceAreaInOctreeData(const UObject& Object, TSubclassOf<UNavArea> OldArea, TSubclassOf<UNavArea> NewArea, bool bReplaceChildClasses);
|
|
void AddLevelCollisionToOctree(ULevel& Level);
|
|
void RemoveLevelCollisionFromOctree(ULevel& Level);
|
|
void UpdateActorAndComponentsInNavOctree(AActor& Actor);
|
|
void ProcessPendingOctreeUpdates();
|
|
};
|