//-------------------------------------------------------------------------------------------- void NtfRefreshScene() { mScnCtrl.ResetCtrl(); List <string> vAry = ArchiveUtil.NtfGetFiles(GetGamePath(), true, "*.unity"); foreach (string sPth in vAry) { string sf = ArchiveUtil.NtfPathAfter(mPath, sPth); mScnCtrl.AddItem(new TglItem(true, sf)); } }
//-------------------------------------------------------------------------------------------- // 刷新公共资源列表 void NtfRefreshPublic() { mPubLst.ResetCtrl(); List <string> pths = ArchiveUtil.NtfGetDirs(Application.dataPath, false, ArchiveUtil.mSkips); foreach (string sPth in pths) { string sl = sPth.ToLower(); if (!sl.Contains("resources")) { mPubLst.AddItem(new TglItem(true, sPth)); } } }
//-------------------------------------------------------------------------------------------- void NtfRefreshPath() { if (m_useConfig) { NtfRefreshPathFromConfig(); return; } mPthCtrl.ResetCtrl(); List <string> pths = ArchiveUtil.NtfGetDirs(GetGamePath(), false, ArchiveUtil.mSkips); foreach (string sPth in pths) { string sf = ArchiveUtil.NtfPathAfter(mPath, sPth) + "/"; mPthCtrl.AddItem(new TglItem(true, sf)); } string szPth = GetGamePath(); List <string> vfs = ArchiveUtil.NtfGetFiles(szPth, false, ArchiveUtil.mSkips); foreach (string sf in vfs) { string nf = ArchiveUtil.NtfPathAfter(mPath, sf); mPthCtrl.AddItem(new TglItem(true, nf)); } }
//-------------------------------------------------------------------------------------------- // 刷新游戏列表 void NtfRefreshGames() { mpSelGM = null; mGameRes.Clear(); mGameLst.ResetCtrl(); List <string> pths = ArchiveUtil.NtfGetDirs(Application.dataPath, false, ArchiveUtil.mSkips); foreach (string sPth in pths) { string sl = sPth.ToLower(); if (sl.Contains("package") || sl.Contains("resources") || sl.Contains("extends")) { mGameLst.AddItem(new TglItem(sPth)); string sGm = ArchiveUtil.GetLastPath(sPth); string sPt = ArchiveUtil.NtfPathAfterAssets(sPth); GamePackUI gpu = new GamePackUI(sGm, sPt, this); mGameRes.Add(sGm.ToLower(), gpu); } } OnFirstGame(); }