public static void BuildLuaScript() { //这是build资源的路径 string buildPath = BuildUtil.GetBuildDir(target); string resPath = Path.Combine(buildPath, "lua"); //resPath = F:/ MyGame / Assets\../ AssetBundles\win\lua if (Directory.Exists(resPath)) { Directory.Delete(resPath, true); } AssetDatabase.Refresh(); ClearAllLuaFiles(); if (AppConst.LuaBundleMode) { //HandleLuaBundle(); } else { HandleLuaFile(resPath); } BuildUtil.GenVersionFile(buildPath, BuildUtil.VersionEnum.LUA); BuildUtil.BuildFileIndex(buildPath); AssetDatabase.Refresh(); }
static void BuildResourcesExecute() { Caching.CleanCache();//使用cach模式加载,第一次指定BundleURL,之后会有缓存,需要清除一下 string buildPath = BuildUtil.GetBuildDir(target); string resPath = Path.Combine(buildPath, "res"); //if (Directory.Exists(streamPath)) //{ // Directory.Delete(streamPath, true); // if (File.Exists(streamPath + ".meta")) // File.Delete(streamPath + ".meta"); //} AssetDatabase.Refresh(); ResourcesHandle(resPath); BuildUtil.GenVersionFile(buildPath, BuildUtil.VersionEnum.RES); BuildUtil.BuildFileIndex(buildPath); }