how to import audio into Unity3D wiht coding

how to import audio into Unity3D wiht coding

Option one:

Create a new public AudioClip.

public AudioClip SoundExample;

(and attach sound in Script Component)


Option One

Get direct sound and creat.

AudioClip SoundExample = AudioClip.Create("MySinoid", 44100, 1, 44100, false, true, OnAudioRead, OnAudioSetPosition);