Dropdown of allowed FString values in Function without Enums

I am currently working on an extended logging system and want to include different selectable categories for the logs.
The goal is that developers can call the function, include the message and specify the category of the log.

I already set this up using Enums and a lookup TMap to convert the Enum into a FString for the Logs.
For slight performance improvements I would prefer to directly provide a FString value in the function parameters while keeping a dropdown selection of allowed values in the Editor.

Is this possible / is there specific metadata which could be used for this case?

Current setup (inside of a Blueprint Function Library):

UFUNCTION(BlueprintCallable)
static void LogWarning(FString LogMessage, ELogCategory LogCategory)
{
	UE_LOG(CILogger, Log, TEXT("WARNING %s : %s"),*LogCategoryTextsMap.FindRef(LogCategory),*LogMessage)
}

LogCategoryTextsMap definition:

const TMap<ELogCategory,FString> LogCategoryTextsMap = {
	{ELogCategory::CAT_DEFAULT,""},
	{ELogCategory::CAT_AI,"AI"},
	{ELogCategory::CAT_COLLISION,"Collision"},
	{ELogCategory::CAT_LIGHTNING,"Lightning"}
};
1 Like

In case anyone is interested, I found a solution using a ComboBox for FNames which is kinda the thing I wanted:

Basically an array in the project settings contains all allowed values.They are then added to a ComboBox used in the input pin of the given struct. The struct in my implementation is FMyLoggerNameAttribute and used as follows:

definition

USTRUCT(BlueprintType)
struct FMyLoggerNameAttribute
{
	GENERATED_BODY()
	
	UPROPERTY(BlueprintReadOnly)
	FName NameValue;
};

usage

 UFUNCTION(BlueprintCallable)
 static void LogWarning(FString LogMessage, FMyLoggerNameAttribute LogCategory)
 {
     UE_LOG(CILogger, Log, TEXT("WARNING %s : %s"),*LogCategory.NameValue.ToString(),*LogMessage)
 }

From a performance point of view I could not find measureable difference between the solutions