#pragma once #include "CoreMinimal.h" #include "UObject/NoExportTypes.h" #include "CommonTypes.h" #include "AssetLookup.generated.h" UCLASS(MinimalAPI) class UlxAssetLookup : public UObject { GENERATED_BODY() private: mutable FCriticalSection Mutex; // Map from asset name to full loadable path. UPROPERTY() TMap CachedTangibles; // Map from asset name to to full loadable path. UPROPERTY() TMap CachedStaticMeshes; public: void RebuildIndex(); void ScanTangibles(); void ScanStaticMeshes(); // Get the full path name of a FString TangibleLoadPath(const FName &AssetName) const; // Get a static mesh by its asset name. FString StaticMeshLoadPath(const FName &AssetName) const; // Get a static mesh by name UFUNCTION(BlueprintPure, meta = (WorldContext = "Context"), Category = "Luprex|Miscellaneous") static UStaticMesh *GetStaticMeshByName(const UObject *Context, const FString &Name); // Get a static mesh by name UFUNCTION(BlueprintPure, meta = (WorldContext = "Context"), Category = "Luprex|Miscellaneous") static UClass *GetTangibleClassByName(const UObject *Context, const FString &Name); };