UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FReferenceFinder Class Reference

#include <UObjectGlobals.h>

+ Inheritance diagram for FReferenceFinder:

Public Member Functions

COREUOBJECT_API FReferenceFinder (TArray< UObject * > &InObjectArray, UObject *InOuter=nullptr, bool bInRequireDirectOuter=true, bool bInShouldIgnoreArchetype=false, bool bInSerializeRecursively=false, bool bInShouldIgnoreTransient=false)
 
COREUOBJECT_API ~FReferenceFinder ()
 
virtual COREUOBJECT_API void FindReferences (UObject *Object, UObject *ReferencingObject=nullptr, FProperty *ReferencingProperty=nullptr)
 
virtual COREUOBJECT_API void HandleObjectReference (UObject *&Object, const UObject *ReferencingObject, const FProperty *InReferencingProperty) override
 
virtual bool IsIgnoringArchetypeRef () const override
 
virtual bool IsIgnoringTransient () const override
 
virtual void SetSerializedProperty (class FProperty *Inproperty) override
 
virtual class FPropertyGetSerializedProperty () const override
 
- Public Member Functions inherited from FReferenceCollector
virtual COREUOBJECT_API ~FReferenceCollector ()
 
virtual COREUOBJECT_API void AddStableReference (TObjectPtr< UObject > *Object)
 
virtual COREUOBJECT_API void AddStableReferenceArray (TArray< TObjectPtr< UObject > > *Objects)
 
virtual COREUOBJECT_API void AddStableReferenceSet (TSet< TObjectPtr< UObject > > *Objects)
 
template<typename KeyType , typename ValueType , typename Allocator , typename KeyFuncs >
void AddStableReferenceMap (TMapBase< KeyType, ValueType, Allocator, KeyFuncs > &Map)
 
virtual COREUOBJECT_API void AddStableReference (UObject **Object)
 
virtual COREUOBJECT_API void AddStableReferenceArray (TArray< UObject * > *Objects)
 
virtual COREUOBJECT_API void AddStableReferenceSet (TSet< UObject * > *Objects)
 
template<class UObjectType >
void AddStableReference (UObjectType **Object)
 
template<class UObjectType >
void AddStableReferenceArray (TArray< UObjectType * > *Objects)
 
template<class UObjectType >
void AddStableReferenceSet (TSet< UObjectType * > *Objects)
 
template<class UObjectType >
UE_FORCEINLINE_HINT void AddStableReference (TObjectPtr< UObjectType > *Object)
 
template<class UObjectType >
UE_FORCEINLINE_HINT void AddStableReferenceArray (TArray< TObjectPtr< UObjectType > > *Objects)
 
template<class UObjectType >
UE_FORCEINLINE_HINT void AddStableReferenceSet (TSet< TObjectPtr< UObjectType > > *Objects)
 
template<class UObjectType >
void AddReferencedObject (UObjectType *&Object, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObject (const UObjectType *&Object, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObjects (TArray< UObjectType * > &ObjectArray, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObjects (TArray< const UObjectType * > &ObjectArray, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObjects (TSet< UObjectType * > &ObjectSet, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<typename KeyType , typename ValueType , typename Allocator , typename KeyFuncs >
void AddReferencedObjects (TMapBase< KeyType *, ValueType, Allocator, KeyFuncs > &Map, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<typename KeyType , typename ValueType , typename Allocator , typename KeyFuncs >
void AddReferencedObjects (TMapBase< KeyType, ValueType *, Allocator, KeyFuncs > &Map, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<typename KeyType , typename ValueType , typename Allocator , typename KeyFuncs >
void AddReferencedObjects (TMapBase< KeyType *, ValueType *, Allocator, KeyFuncs > &Map, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObject (TObjectPtr< UObjectType > &Object, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObject (TObjectPtr< const UObjectType > &Object, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObjects (TArray< TObjectPtr< UObjectType > > &ObjectArray, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObjects (TArray< TObjectPtr< const UObjectType > > &ObjectArray, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObjects (TSet< TObjectPtr< UObjectType > > &ObjectSet, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<typename KeyType , typename ValueType , typename Allocator , typename KeyFuncs >
void AddReferencedObjects (TMapBase< TObjectPtr< KeyType >, ValueType, Allocator, KeyFuncs > &Map, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<typename KeyType , typename ValueType , typename Allocator , typename KeyFuncs >
void AddReferencedObjects (TMapBase< KeyType, TObjectPtr< ValueType >, Allocator, KeyFuncs > &Map, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<typename KeyType , typename ValueType , typename Allocator , typename KeyFuncs >
void AddReferencedObjects (TMapBase< TObjectPtr< KeyType >, TObjectPtr< ValueType >, Allocator, KeyFuncs > &Map, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<typename T >
void AddReferencedObject (TWeakObjectPtr< T > &P, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
COREUOBJECT_API void AddReferencedObject (FWeakObjectPtr &P, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
COREUOBJECT_API void AddReferencedObjects (const UScriptStruct *&ScriptStruct, void *Instance, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
COREUOBJECT_API void AddReferencedObjects (TObjectPtr< const UScriptStruct > &ScriptStruct, void *Instance, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
COREUOBJECT_API void AddReferencedObjects (TWeakObjectPtr< const UScriptStruct > &ScriptStruct, void *Instance, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
COREUOBJECT_API void AddPropertyReferences (const UStruct *Struct, void *Instance, const UObject *ReferencingObject=nullptr)
 
COREUOBJECT_API void AddPropertyReferencesWithStructARO (const UScriptStruct *Struct, void *Instance, const UObject *ReferencingObject=nullptr)
 
COREUOBJECT_API void AddPropertyReferencesWithStructARO (const UClass *Class, void *Instance, const UObject *ReferencingObject=nullptr)
 
COREUOBJECT_API void AddPropertyReferencesLimitedToObjectProperties (const UStruct *Struct, void *Instance, const UObject *ReferencingObject=nullptr)
 
virtual bool NeedsPropertyReferencer () const
 
virtual void AllowEliminatingReferences (bool bAllow)
 
virtual bool MarkWeakObjectReferenceForClearing (UObject **WeakReference, UObject *ReferenceOwner)
 
virtual void SetIsProcessingNativeReferences (bool bIsNative)
 
virtual bool IsProcessingNativeReferences () const
 
virtual bool NeedsInitialReferences () const
 
FReferenceCollectorArchiveGetVerySlowReferenceCollectorArchive ()
 

Protected Attributes

TArray< UObject * > & ObjectArray
 
TSet< const UObject * > ObjectSet
 
UObjectLimitOuter
 
class FPropertySerializedProperty
 
bool bRequireDirectOuter
 
bool bShouldIgnoreArchetype
 
bool bSerializeRecursively
 
bool bShouldIgnoreTransient
 

Additional Inherited Members

- Protected Member Functions inherited from FReferenceCollector
virtual void HandleObjectReferences (UObject **InObjects, const int32 ObjectNum, const UObject *InReferencingObject, const FProperty *InReferencingProperty)
 
virtual COREUOBJECT_API void HandleObjectReferences (FObjectPtr *InObjects, const int32 ObjectNum, const UObject *InReferencingObject, const FProperty *InReferencingProperty)
 

Detailed Description

FReferenceFinder. Helper class used to collect object references.

Constructor & Destructor Documentation

◆ FReferenceFinder()

FReferenceFinder::FReferenceFinder ( TArray< UObject * > &  InObjectArray,
UObject InOuter = nullptr,
bool  bInRequireDirectOuter = true,
bool  bInShouldIgnoreArchetype = false,
bool  bInSerializeRecursively = false,
bool  bInShouldIgnoreTransient = false 
)

Constructor

Parameters
InObjectArrayArray to add object references to
InOutervalue for LimitOuter
bInRequireDirectOutervalue for bRequireDirectOuter
bShouldIgnoreArchetypewhether to disable serialization of ObjectArchetype references
bInSerializeRecursivelyonly applicable when LimitOuter != nullptr && bRequireDirectOuter==true; serializes each object encountered looking for subobjects of referenced objects that have LimitOuter for their Outer (i.e. nested subobjects/components)
bShouldIgnoreTransienttrue to skip serialization of transient properties

◆ ~FReferenceFinder()

FReferenceFinder::~FReferenceFinder ( )
default

Member Function Documentation

◆ FindReferences()

void FReferenceFinder::FindReferences ( UObject Object,
UObject ReferencingObject = nullptr,
FProperty ReferencingProperty = nullptr 
)
virtual

Finds all objects referenced by Object.

Parameters
ObjectObject which references are to be found.
ReferencingObjectobject that's referencing the current object.
ReferencingPropertyproperty the current object is being referenced through.

◆ GetSerializedProperty()

virtual class FProperty * FReferenceFinder::GetSerializedProperty ( ) const
inlineoverridevirtual

Gets the property that is currently being serialized

Reimplemented from FReferenceCollector.

◆ HandleObjectReference()

void FReferenceFinder::HandleObjectReference ( UObject *&  InObject,
const UObject InReferencingObject,
const FProperty InReferencingProperty 
)
overridevirtual

Handle object reference. Called by AddReferencedObject.

Parameters
ObjectReferenced object.
ReferencingObjectReferencing object (if available).
ReferencingPropertyReferencing property (if available).

Implements FReferenceCollector.

◆ IsIgnoringArchetypeRef()

virtual bool FReferenceFinder::IsIgnoringArchetypeRef ( ) const
inlineoverridevirtual

If true archetype references should not be added to this collector.

Implements FReferenceCollector.

◆ IsIgnoringTransient()

virtual bool FReferenceFinder::IsIgnoringTransient ( ) const
inlineoverridevirtual

If true transient objects should not be added to this collector.

Implements FReferenceCollector.

◆ SetSerializedProperty()

virtual void FReferenceFinder::SetSerializedProperty ( class FProperty Inproperty)
inlineoverridevirtual

Sets the property that is currently being serialized

Reimplemented from FReferenceCollector.

Member Data Documentation

◆ bRequireDirectOuter

bool FReferenceFinder::bRequireDirectOuter
protected

Determines whether nested objects contained within LimitOuter are considered.

◆ bSerializeRecursively

bool FReferenceFinder::bSerializeRecursively
protected

Determines whether we should recursively look for references of the referenced objects.

◆ bShouldIgnoreArchetype

bool FReferenceFinder::bShouldIgnoreArchetype
protected

Determines whether archetype references are considered.

◆ bShouldIgnoreTransient

bool FReferenceFinder::bShouldIgnoreTransient
protected

Determines whether transient references are considered.

◆ LimitOuter

UObject* FReferenceFinder::LimitOuter
protected

Only objects within this outer will be considered, nullptr value indicates that outers are disregarded.

◆ ObjectArray

TArray<UObject*>& FReferenceFinder::ObjectArray
protected

Stored reference to array of objects we add object references to.

◆ ObjectSet

TSet<const UObject*> FReferenceFinder::ObjectSet
protected

Set that duplicates ObjectArray. Keeps ObjectArray unique and avoids duplicate recursive serializing.

◆ SerializedProperty

class FProperty* FReferenceFinder::SerializedProperty
protected

Property that is referencing the current object


The documentation for this class was generated from the following files: