I have a large number of WAV files that I want to add as AudioSources on an object in my game. Rather than add them individually by hand, I thought I'd write a ScriptableWizard to do it, but I can't figure out how to go from a filename of a WAV file to an AudioSource. Can anyone please help?
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
No one has followed this question yet.
The name 'Joystick' does not denote a valid type ('not found')
Audio Scene swapping problem
help sound on collision when key down
Leap Motion - Unity error message when adding sound effect