"Presets" and "Variant Manager" and how we do create for blueprints?

Hey, as Level Designer I am wondering how presets are created for the blueprints themselves and what are the best practices?

To me, Preset means a ready-made set of settings with specific values. For example, a door with such a Mesh when it opens will play such a sound with such a Trigger. An exploding barrel with this shape, sound one will fly, the other will be static.

The most common example I found out is Blueprint Children that take data from the main Blueprint. It’s a mess when you have multiple Children. When objects for stores are created, Data Assets, Data Tables are most often used, but it requires Rows and Tables.

Lately, I found out the Level Variants (Variant Manager) but they work only for specific Actors on Level and this thing would be awesome if I could connect somehow with the Blueprint:

Example 1:

  • Placing “BP_Door”
  • Selecting in Details Variant “Closed - Non Interactive” OR “Opened” OR “Destroyed” from Variant Manager.

Example 2:

  • Placing “BP_Chest” on Level.
  • Selecting in Details Variant “Looted” OR “Loot” OR “Destroyed”.

Could you tell me about your pratices or ideas how to setup thing like this?

It all depends on the complexity of your presents and variants. If you want to do this in blueprints you can setup a door class which contains the overarching components of a door, and then you add the other functionality in a child of the door class.

You would want a mesh, sound, and a way to animate the door, etc. So you add all of these as variables. Then if you want to have an interactive way to switch the states on the door from opened, closed, destroyed, etc, and enum would work great in this case.

How to create an enum:

How to add “states” to the enum:

In the door class, simply add the enum as a variable, run a switch on door class and add the code you desire. Doing this in construction scripts will allow you to switch it in the editor:

If you make the variable public, you should be able to tweak it via a drop down menu, in the details panel:
bild

You can tick the eye to make it public / visible in the details panel:
bild

Doing that, but Is this currently the best solution?

I imagine that I combine the output from Enums with Data Table/Data Asset and it’s OK, but I still feel like it’s way too complicated.

BP still require additional variables (Set Mesh, Set Audio, Set Interactive, Set Text per each Variable), but to these Variables you have to align per each output instead of BP reading automatically the Variants (and set of settings you need) that are in one place.

Too bad Variant Manager does not working with it.

Sorry for Quality, but I don’t have better example for now.

Or maybe it would be possible to make a function for this, which will get through all the things to set and depending on the enum in this function insert meshes and audio?

This is looking all good! I don’t see any problem, and if you are worried about performance, at this stage this shouldn’t really make a dent.

I would probably do something similar to what you have done, so I think it’s great! I suggest that you perhaps create components that the blueprint can reuse. Say you have an audio function that you end up recreating for many other blueprints. Then turn it into a component and add that component into other meshes.

Feel free to mark your question as resolved if you feel that you have everything you need to continue! :slight_smile:

1 Like

Thanks for the words of support, but I still feel that there is a huge room for simplifying work in this way.

I’m hoping to find some more people who will share more about their workflow on setups.

Ok. I started to test even more this case and it looks like I am able to limit myself to adding new variablies and only enums so it’s pretty much enough what I need, but I’m still wondering about other people pipelines. :wink: @EliasWick I’m sure you have more experience than me in UE, can you tell if this way is correct or there’s gonna be a wall someday when you’re looking at this script?

Or it’s better to run this on Data Assets?

This is absolutely fine, if you are worried that you need to update it and that you’ll want to make larger changes, creating a Data Asset would be a good solution.

We use Data Assets for doors at the office, but they are quite complex and contains a lot of data.