Files
Project-Reboot-3.0/Project Reboot 3.0/WeakObjectPtr.h
2023-04-05 07:55:28 -04:00

20 lines
491 B
C++

#pragma once
#include "UObjectArray.h"
struct FWeakObjectPtr
{
public:
int ObjectIndex;
int ObjectSerialNumber;
UObject* Get()
{
return ChunkedObjects ? ChunkedObjects->GetObjectByIndex(ObjectIndex) : UnchunkedObjects ? UnchunkedObjects->GetObjectByIndex(ObjectIndex) : nullptr;
}
bool operator==(const FWeakObjectPtr& other)
{
return ObjectIndex == other.ObjectIndex && ObjectSerialNumber == other.ObjectSerialNumber; // i need to check in ue if we check serialnumber
}
};