Hey,
So for our game, our character may find himself or herself among different environments. They can be on a grassy terrain, a wooden floor, a rock and more. These two types of ground surfaces can be within a few meters apart of eachother. When the player jumps and lands, we will play a sound. This landing sound will be dependant on the physics surface type, set up in the physics material of that ground.
This all nice and dandy, except for the fact that we’re not sure what the best way is to handle all these different sound assets. We can give the character actor a million UAudioComponents, one for each surface type. This sounds like a bad solution, as you will quickly lose the overview of other characters properties and code. Using a single audio component is also not ideal, because you can only set one sound at a time, and if you switch the sound while the other one is still player, it’ll play the newly set sound. The audio itself is positional as well, such that other players can hear the other player landing. Using a TMap of audio components is also no option, as that’s simply not supported by the engine.
So, what else would be a good idea in this situation? Is there some kind of asset management class I am aware of that I can use?
Thanks,
Shammah


