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

@@ -24,7 +24,7 @@ static inline T* FindObject(const TCHAR* Name, UClass* Class = nullptr, UObject*
}
template <typename T = UObject>
static inline T* LoadObject(const TCHAR* Name, UClass* Class = nullptr, UObject* Outer = nullptr)
static inline T* LoadObject(const TCHAR* Name, UClass* Class = T::StaticClass(), UObject* Outer = nullptr)
{
if (!StaticLoadObjectOriginal)
{
@@ -46,7 +46,8 @@ static inline T* LoadObject(const std::string& NameStr, UClass* Class = nullptr,
template <typename T = UObject>
static inline T* FindObject(const std::string& NameStr, UClass* Class = nullptr, UObject* Outer = nullptr)
{
auto NameCWSTR = std::wstring(NameStr.begin(), NameStr.end()).c_str();
std::string name = NameStr;
auto NameCWSTR = std::wstring(name.begin(), name.end()).c_str();
return StaticFindObject<T>(Class, Outer, NameCWSTR);
}