- Home /
how load to packed local data, use WWW.
first i`m not origin English user.
my problem is packing local data.
i do not use Resources.Load(). Because of i need stream in WWW class. and use local data. project have not problem in editor
but after build have problem.
can`t find absolute path file. because of the file is packing file in assets folder.
how to load using WWW local file after build packing?
AudioClip clip = null;
string name = "file://" + System.Environment.CurrentDirectory + "\\Assets\\_Project\\Resources\\sound\\Expositor\\" + audioName + ".wav";
WWW www = new WWW(name);
if (www.error == null)
{
clip = www.audioClip;
clip.name = audioName;
AudioSource Talk = new AudioSource;
Talk.clip = clip;
Talk.Play();
}
Comment
Your answer