Hi,
I use this code for iOS path:
public static string GetiPhoneDocumentsPath ()
{
string path = Application.dataPath.Substring (0, Application.dataPath.Length - 5);
path = path.Substring(0, path.LastIndexOf('/'));
return path + "/Documents";
}
Documents folder include many .wav files.
I want to play this audioClips.
I try this code:
string filepath = Path.Combine(GetiPhoneDocumentsPath(),SongName);
AudioClip my = (AudioClip)Resources.Load(filepath, typeof(AudioClip));
audio.clip = my;
audio.Play();
but didn't work :(
How can I do???
↧