Much better handling of type lookups

This commit is contained in:
2026-03-18 23:20:10 -04:00
parent 336b80df39
commit 467c1464aa
7 changed files with 15 additions and 70 deletions

View File

@@ -4,6 +4,7 @@
#include "WingServer.h"
#include "WingHandler.h"
#include "WingUtils.h"
#include "WingTypes.h"
#include "AssetRegistry/AssetRegistryModule.h"
#include "AssetRegistry/IAssetRegistry.h"
#include "Asset_Search.generated.h"
@@ -49,12 +50,8 @@ public:
if (!Type.IsEmpty())
{
UClass* TypeClass = WingUtils::FindClassByName(Type);
if (!TypeClass)
{
UWingServer::Printf(TEXT("ERROR: Unknown asset type '%s'\n"), *Type);
return;
}
UClass* TypeClass = UWingTypes::TextToOneObjectType(Type);
if (!TypeClass) return;
Filter.ClassPaths.Add(TypeClass->GetClassPathName());
}