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.
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).
To help users post good questions and use the site effectively we have posted a user guide. Please check it out.
Answers and Comments
No one has followed this question yet.
The name 'Joystick' does not denote a valid type ('not found')
How to emit a sound on specific collision.
Different music for pause menu?
Synch clips with BPM
GUIlayout background image or color