Here we have a small tip which can save you from a bunch of repetition!
Did you know you can quickly bulk fill in arrays in blueprints?
If you would prefer to watch my video version, check it out here
For today’s example, I have a pretend footstep setup in Meta Sound Source. We are playing a random sound which is being fed by randomly selecting from an array. In this situation, we would likely want to have a large number of footstep samples to create a nice variety.
To fill the array, normally, you would click on the little plus Icon and then click the drop-down and search for the sound you want. This is fine if you only have 1 or 2 sounds to fill in. However, if you had, say, 25 sounds to select it would take a long time.
Or a second, slightly faster way to do this is to drag and drop the audio asset from the content browser into your array slot. However this can also be cumbersome if you had a large number assets to add.
However, when dealing with a large number of sounds, the best way I have found is to select all the sounds you need in the content browser and drag and drop into the top of the array defaults (next to the little plus icon). This will add them all to the array in one go.
Now, an important thing to know about doing this is that it ADDS to the end of the array; it does not replace the array. This is important to know because otherwise, you may get duplicates or assets you were not expecting. For example, below you can see that although I dragged in 25 audio assets. However, I actually have 26 elements in the array because there was one asset already present when I bulk added. So I need to remove the offender from the array.
A great thing about this is it seems to work everywhere you have an array. Imagine we're doing hit reacts and have a lot of variants that we need to add. Below you can see me quickly adding a bunch of montages to an array of montages in my pawn.
You really can see how fast it makes it. I really do find today’s tip especially useful when working with audio, as I often I often end up setting up assets which require a large number of sounds.
I love these little time-saving tips because I think they make things a lot quicker, easier, and they make the flow of using the editor a lot smoother!
Want to know when I release new quick Unreal tips & tricks?
Enjoyed this? Check out my other work: