Hi All,
I am a novice into unity and i need to access files to load a different scene file within an apk.
I have got the directory in an apk by adding those files in StreamingAssets folder and can see files within the apk bundle when i extract it .
I am trying to access the file like below:
public static string getAllGames()
{
string gamefiles;
string Path = "jar:file://" + Application.dataPath + "!/assets/";
WWW wwwfile = new WWW(Path);
while (!wwwfile.isDone) { }
var filepath = string.Format("{0}/{1}", Application.persistentDataPath, "");
File.WriteAllBytes(filepath, wwwfile.bytes);
gamefiles = System.IO.Directory.GetDirectories(filepath + "/");
for (int i = 0; i < gamefiles.Length; i++)
{
gamefiles _= gamefiles*.Replace(path + "/", "");*_
}
return gamefiles;
nothing happens in the app , Please let me know what i am doing wrong here