SAME BPS ON DIFFERENT LEVELS?

Hello guys! :slightly_smiling_face:

How can I reuse a bp I built in one level of the project, in a different level? Is it enough to drag the bp again from the content into the scene, or is there something else I need to do?
I ask to be sure to optimize the project as much as possible.

Thank y’all so much!

1 Like

Just drag it in :slight_smile:

1 Like

@ClockworkOcean
for example the bp that generates the map, how can I use it only for the assets of the current level? Should I modify the list of actors in the array for the spawns but would this make the same changes in all the levels? or not? Because I would like to reuse the same logic that I wrote but on different actor lists, which should change in run time as the levels vary. I hope you understand what I mean

1 Like

You have to parameterize the actor lists ( arrays etc ).

In the BP itself, there are spaces for all this, but unpopulated. When you drag it into the map, you can tell it what meshes you want, and the BP gets saved with that map.

When you drag it into a second map, it starts empty because you haven’t specified anything from the content browser yet. Then you can set all the parameters and let the BP populate the second map.

Does that make some sort of sense?

You could also change things at runtime, it’s just a choice you make about the design.

1 Like

@ClockworkOcean

I did a test, dragged my generator into the second level, and it still had the list I had previously compiled in another level. So I’m doing this:

I just created a structure that contains an array of actor ref, because my rooms are bp actor. The map will then have as key the name of the current level, and this key in the beginplay will give me the list that I update manually. I clean the array that I had pre-compiled, then I fill it with the correct values. From the tests with the print string it works. What do you think?

1 Like

If it puts the right things in the level, it’s working! :smiley:

1 Like

@ClockworkOcean

It would seem so! I need to do more testing though. If you think I’m not forgetting anything to optimize the levels in this sense, I think you given me the solution :upside_down_face:

1 Like