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, 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.
Answers and Comments
No one has followed this question yet.
The name 'Joystick' does not denote a valid type ('not found')
Can you make this work? (Click Collider = Make Sound)
Footstep sounds not coming up when walking? (MOBILE)
How to make a pick up gun script?