Hey,
im basicly loading 10 ogg files from a certain folder. That all works fine, playing them too. But when i pulbish my build and try it from there, the songs cant load. Doesnt even give errors and it does find the songs. Im really clueless.
try
{
string path = Application.dataPath;
path = path.Substring(0,path.LastIndexOf("/")) + "/Music";
allMusicClips = new ArrayList();
DirectoryInfo info = new DirectoryInfo(path);
fileInfo = info.GetFiles();
for (int i=0;i<fileInfo.Length;i++)
{
WWW www = new WWW("file://"+fileInfo*.ToString());*
-
StartCoroutine(FinishedLoadingSong(www));*
-
}*
-
}*
-
catch (System.Exception e)*
-
{*
-
Debug.Log(e.ToString());*
-
}*
IEnumerator FinishedLoadingSong(WWW www)
- {*
-
yield return www;*
-
AudioClip temp =www.GetAudioClip(true,true);*
-
temp.name = www.url;*
-
allMusicClips.Add(temp);*
-
AbleToPlayMP3 = true;*
- }*
Edit: code format is good now, sorry about that