//no platform private string GetPathNoTarget(string fielName) { string path = Path.Combine(FirstUtil.OutDir, fielName); if (!File.Exists(path)) { path = FirstUtil.GetStreamingAssetsPathNoTarget() + fielName; } else { path = "file:///" + path; } return(path); }
IEnumerator InitInfos() { FirstRecordMsg.Init(); gameObject.AddComponent <FirstPlatform>(); string path = FirstUtil.GetStreamingAssetsPathNoTarget() + "version.txt"; WWW www = new WWW(path); yield return(www); localVersion = getWWWTxt(www, false); www = null; path = FirstUtil.GetStreamingAssetsPathNoTarget() + "gameDefine.txt"; www = new WWW(path); yield return(www); localGameDefine = getWWWTxt(www, false); www = null; path = FirstUtil.GetStreamingAssetsPathNoTarget() + "filelist.txt"; www = new WWW(path); yield return(www); loccalFileList = getWWWTxt(www, false); www = null; InitLocalInfo(); InitOutDir(); path = GetPathNoTarget("version.txt"); www = new WWW(path); yield return(www); outLocalVersion = getWWWTxt(www); www = null; path = GetPathNoTarget("gameDefine.txt"); www = new WWW(path); yield return(www); outLocalGameDefine = getWWWTxt(www); www = null; path = GetPathNoTarget("filelist.txt"); www = new WWW(path); yield return(www); outloccalFileList = getWWWTxt(www, false); www = null; path = GetPathNoTarget("FirstLang.txt"); www = new WWW(path); yield return(www); InitLang(getWWWTxt(www, false)); www = null; WriteLog("InitFilstInfo"); InitData(); StartCoroutine(CheckUpdate()); FirstResource.InitAppFileList(loccalFileList); #if UNITY_EDITOR FirstResource.InitSdFileList(""); #else FirstResource.InitSdFileList(outloccalFileList); #endif localVersion = null; outLocalVersion = null; localGameDefine = null; outLocalGameDefine = null; loccalFileList = null; outloccalFileList = null; StartCoroutine(WorkerUI()); }