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 site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
No one has followed this question yet.
The name 'Joystick' does not denote a valid type ('not found')
Getting audio.PlayOneShot to work
Game created that Users can add own music?
How to emit an audioClip on Collision