tassetptr impl, harvesting stuff, relevancy?

This commit is contained in:
Milxnor
2023-03-26 21:37:47 -04:00
parent f42c420486
commit 9c8b327cd7
23 changed files with 267 additions and 37 deletions

View File

@@ -4,6 +4,7 @@
#include "PersistentObjectPtr.h"
#include "SoftObjectPath.h"
#include "AssetPtr.h"
#include "reboot.h"
@@ -20,9 +21,17 @@ public:
T* Get()
{
if (SoftObjectPtr.ObjectID.AssetPathName.ComparisonIndex.Value <= 0)
return nullptr;
if (Engine_Version <= 416)
{
auto& AssetPtr = *(TAssetPtr<T>*)this;
return AssetPtr.Get();
}
else
{
if (SoftObjectPtr.ObjectID.AssetPathName.ComparisonIndex.Value <= 0)
return nullptr;
return FindObject<T>(SoftObjectPtr.ObjectID.AssetPathName.ToString());
return FindObject<T>(SoftObjectPtr.ObjectID.AssetPathName.ToString());
}
}
};