mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
28 lines
475 B
C++
28 lines
475 B
C++
#pragma once
|
|
|
|
#include "Object.h"
|
|
|
|
#include "PersistentObjectPtr.h"
|
|
#include "SoftObjectPath.h"
|
|
|
|
#include "reboot.h"
|
|
|
|
struct FSoftObjectPtr : public TPersistentObjectPtr<FSoftObjectPath>
|
|
{
|
|
public:
|
|
};
|
|
|
|
template<class T = UObject>
|
|
struct TSoftObjectPtr
|
|
{
|
|
public:
|
|
FSoftObjectPtr SoftObjectPtr;
|
|
|
|
T* Get()
|
|
{
|
|
if (SoftObjectPtr.ObjectID.AssetPathName.ComparisonIndex.Value <= 0)
|
|
return nullptr;
|
|
|
|
return FindObject<T>(SoftObjectPtr.ObjectID.AssetPathName.ToString());
|
|
}
|
|
}; |