5#include "CoreMinimal.h"
6#include "Engine/DeveloperSettings.h"
7#include "EnvironmentPathRegistry.generated.h"
10UCLASS(Config=Game, defaultconfig, meta=(DisplayName=
"Environment Path Registry"))
23 UPROPERTY(EditAnywhere, Config, Category =
"Registry", meta=(ContentDir))
24 TMap<FName, FDirectoryPath> DirectoryRegistry;
27 UPROPERTY(EditAnywhere, Config, Category = "Registry")
28 TMap<FName, FSoftObjectPath> AssetRegistry;
45 if (
const FSoftObjectPath* Asset = Settings->
AssetRegistry.Find(Key))
47 return Asset->ToString();
69 const FSoftObjectPath ObjectPath = FSoftObjectPath(Path);
71 if (!ObjectPath.IsValid())
76 return TSoftObjectPtr<T>(ObjectPath);
96 return TSoftObjectPtr<T>(FSoftObjectPath(Path)).LoadSynchronous();
FORCEINLINE TSoftObjectPtr< T > GetEnvironmentSoftPtrByKey(const FName &Key)
Definition EnvironmentPathRegistry.h:55
FORCEINLINE T * GetEnvironmentAssetByKey(const FName &Key)
Definition EnvironmentPathRegistry.h:81
FORCEINLINE FString GetEnvironmentPathByKey(const FName &Key)
Definition EnvironmentPathRegistry.h:36
Definition EnvironmentPathRegistry.h:12
TMap< FName, FDirectoryPath > DirectoryRegistry
Definition EnvironmentPathRegistry.h:24
virtual FName GetCategoryName() const override
Definition EnvironmentPathRegistry.h:16
TMap< FName, FSoftObjectPath > AssetRegistry
Definition EnvironmentPathRegistry.h:28