You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Core - Adding support for getting the PathName from a ObjectPtr without resolving the Object*.
Core - Refactoring the Object Handle event callbacks so that we can hook and unhook them with delegates/delegatehandles. Core - Adding support for detecting loads via object handles as a new event distinct from resolution callback. Core - Expanding the utility functions on FObjectRef so that we can resolve it in a myraid of fashions to get the path, the class path, the full path and the export path. [REVIEW] [at]Zousar.Shaker, [at]Joe.Pribele [CL 22063982 by nick darnell in ue5-main branch]
This commit is contained in:
@@ -86,19 +86,10 @@ private:
|
||||
{
|
||||
NumFailedResolves++;
|
||||
}
|
||||
|
||||
if (PrevResolvedFunc)
|
||||
{
|
||||
PrevResolvedFunc(ObjectRef, Pkg, Obj);
|
||||
}
|
||||
}
|
||||
static void OnRefRead(UObject* Obj)
|
||||
{
|
||||
NumReads++;
|
||||
if (PrevReadFunc)
|
||||
{
|
||||
PrevReadFunc(Obj);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -116,16 +107,18 @@ private:
|
||||
if (!bCallbacksInstalled)
|
||||
{
|
||||
#if UE_WITH_OBJECT_HANDLE_TRACKING
|
||||
PrevResolvedFunc = SetObjectHandleReferenceResolvedCallback(OnRefResolved);
|
||||
PrevReadFunc = SetObjectHandleReadCallback(OnRefRead);
|
||||
ResolvedCallbackHandle = AddObjectHandleReferenceResolvedCallback(FObjectHandleReferenceResolvedDelegate::CreateStatic(OnRefResolved));
|
||||
HandleReadCallbackHandle = AddObjectHandleReadCallback(FObjectHandleReadDelegate::CreateStatic(OnRefRead));
|
||||
// TODO We should unhook these handles somewhere, but i don't want to refactor the test, it's not as if they were
|
||||
// being unhooked before. So...
|
||||
#endif
|
||||
bCallbacksInstalled = true;
|
||||
}
|
||||
}
|
||||
|
||||
#if UE_WITH_OBJECT_HANDLE_TRACKING
|
||||
static ObjectHandleReferenceResolvedFunction* PrevResolvedFunc;
|
||||
static ObjectHandleReadFunction* PrevReadFunc;
|
||||
static FDelegateHandle ResolvedCallbackHandle;
|
||||
static FDelegateHandle HandleReadCallbackHandle;
|
||||
#endif
|
||||
static thread_local uint32 NumResolves;
|
||||
static thread_local uint32 NumFailedResolves;
|
||||
|
||||
Reference in New Issue
Block a user