I’m not 100% certain on what it is you want to do. Am I correct in saying you essentially want to have a custom Blueprint node, such that when you pass in your selected category, the node returns an Array associated with that class type. And then are you wanting to just simply have a dropdown on the node which allows you to select a category, or are you wanting to pass the category in as an object? Sorry if I’ve misunderstood. However I believe you can use an Enum for this sort of thing.
/** We use an Enum to represent the different Categories that we want to have in our DropDown */
UENUM(BlueprintType)
enum class EMyEnum : uint8
{
MyFirstCategory UMETA(DisplayName = "MyFirstCategory"), // We set the DisplayName with the UMETA macro.
MySecondCategory UMETA(DisplayName = "MySecondCategory"),
MyThirdCategory UMETA(DisplayName = "MyThirdCategory"),
...
};
/** This is our UFUNCTION() which will have a dropdown on it, and then return the appropriate array.
* To display the Enum as a drop down we use TEnumAsByte<EMyEnum>*/
TArray<MyArrayDataType> UMyClass::GetCategoryData(const TEnumAsByte<EMyEnum>& Category)
{
/** Use a switch statement to return the array from the selected category */
switch(Category)
case EMyEnum::MyFirstCategory:
return MyFirstCategoryObject->MyFirstCategoryArray;
case EMyEnum::MySecondCategory:
return MySecondCategoryObject->MySecondCategoryArray;
case EMyEnum::MyThirdCategory:
return MyThirdCategoryObject->MyThirdCategoryArray;
...
}
Hope this is of some use to you.