Dynamic Enums or Custom Drop Downs for the Details Panels

Currently I am able to make manual enums that I can Use to configure certain Systems, Monsters/Treasure/NPC Types ETC. But the issue is when making modifications to my system these may expand. I wonder if there could be a custom drop down that could be populated dynamically by Customization options with an IDed and Named indexes…

Like:

npcType.addItem(0,“Wander”);
npcType.addItem(1,“Patrol”);
npcType.addItem(2,“Stationary”);
npcType.addItem(3,“Ambiant”);

If there is something like that already please let me know.

Thank you,
Kevin

You could use a class pointer and it will show a combo of all classes derived from a particular parent. Or you could use a name property, and use a details customization to have a combo box with certain options.

Hm, how would this be doable?
I’m trying to have a byte which can be set to a number. Depending on this number I want to show a dropdown menu (dynamic enum??) with e.g. numbers from 1 to ‘byte-number’. This dropdown list would need to change dynamically when changing the byte.
This all shall take place in the details panel in the editor (PostEditChangeProperty()…).

I don’t have any ideas so far : s.

in 4.9, you can expose FDataTableRowHandle and FDataTableCategoryHandle inside DataTable.h

just change their USTRUCT() to USTRUCT(BlueprintType), then you can use them as an exposed blueprint property, and it will give you a drop down list of all the row names. (the category handle will give you drop down lists of other columns)

2 Likes

Wait. How does that work? Can you give a pure C++ example of turning Data Table rows into a drop down picker.

https://forums.unrealengine.com/community/community-content-tools-and-tutorials/8205-blueprint-helpful-bp-functions/page6

Fixed Broken Link