[Request] Enum variable

Creating a custom enum variable (i mean a drop down control when exposed) that we can populate with our own things will be cool. For example i can add something like ENUM_Mesh1, ENUM_Mesh2, ENUM_Mesh3 etc and in ConstructionScript i’ll set it to swap models based on the Enum value, so i could change to any mesh i want through the Details Tab.

Hey ,

Thanks for the question! This functionality is already available to you! In any blueprint, you can right-click in the MyBlueprint tab and select Create Enum Asset:

createenum.jpg

Once created, you can name it and add Enumerators to it in the Details tab of the Blueprint editor. Once the asset is created (and it is actually an asset created in the Content Browser) you can create a new variable and set its type to your Enum ( MyPicker in this screenshot):

populateenum.jpg

You can set your new variable to be editable, which will give you a drop-down box in the Details tab of your placed blueprint. In your Blueprint’s ConstructionScript you can drag in your variable and drag off of it to create a Switch On for your Enum, which will let you execute whatever additional script you want based on the value selected in the drop-down:

enumconsscript.jpg

Thanks!

wow…Thank you very much . Exactly what i needed! :smiley:

Has this been removed? I cannot see this option in 4.2 (built from source)

has this been removed ? Can’t see it anywhere…

Please see my new answer for updated information about Enumerations

This appears to have been moved slightly at least in 4.4

Look in content browser for NewAsset->Blueprints->Enumeration

14254-enum.jpg

Hi ZeroParadigm,

Thanks for updating this. I deleted my old answer with the information that is no longer relevant to the current version. Keep up the good work!

Hello,

This is a question from the beta version of the engine. We are marking this answered for tracking purposes. If you are experiencing an issue similar to this please post a new question.

Thank you.