I have painstakingly created over 100 sound files to be used in my game. Is there a way to add all of these to a game object, rather than one at a time?!
The source files are text format, so it’s possible to add them in a text editor of your choice.
Yeah, that was my first thought, actually! When I opened the files they were a bit “messy”, with redundant properties like “position” and “rotation” (which doesn’t apply to sound files in the editor):
"components {\n"
" id: \"G4\"\n"
" component: \"/game/sounds/G4.sound\"\n"
" position {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" }\n"
" rotation {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" w: 1.0\n"
" }\n"
"}\n"
In the end a bit the bullet and added them all manually, to be sure I didn’t mess up the file structure.
I’m at it again with sounds, and have promoted this post to an Official Feature Request!
It would save so much time to be able to add more than one file at a time.
Edit: I’m demoting it again, because I realised you can add sound components directly to a collection, without having to first create a .sound file. Leaving this here mostly as a note to self for when I come to add sounds to the next game.
I’ve found it easiest to copy one of the sounds already present and then rename it/change the sound.
Yes, that’s what I now started doing. This is time consuming when it’s a file, but when it’s an object inside a collection it’s pretty plain sailing.
I wonder if this couldn’t be solved by an editor extension? Select multiple wav or ogg files and right click->Add as sound components to add them to the currently open collection or game object
Three years later and this issue is still not resolved, despite the fact that adding multiple files at once isn’t an esoteric use. Sound files, multiple factories for object spawning, etc.