public static void OpenAssetBundleImporterFixedEditor() { AssetBundleImporterFixedEditor uv = EditorWindow.GetWindow <AssetBundleImporterFixedEditor>(false, "导入修复管理理器", true); uv.Show(); uv.autoRepaintOnSceneChange = true; }
public static void OpenAssetBundleImporterFixedEditorFromCommandLine() { EditorRunTypeWindow.RunFromCommandLine(); AssetBundleManagerEditor uv1 = EditorWindow.GetWindow <AssetBundleManagerEditor>(false, "AssetBundle管理理器", false); uv1.Close(); AssetBundleImporterFixedEditor uv = EditorWindow.GetWindow <AssetBundleImporterFixedEditor>(false, "导入修复管理理器", true); uv.Show(); uv.autoRepaintOnSceneChange = true; }
public static void BuildFullPackage_Impl(bool Version_64Bit) { if (!Is64bitEditor) { Debug.LogError("发布只能使用64位编辑器"); return; } //if (!Is64BitNativeDll("game.dll") && Version_64Bit) //{ // Debug.LogError("NativeDLL不是64位版本"); // return; //} //if (Is64BitNativeDll("game.dll") && !Version_64Bit) //{ // Debug.LogError("NativeDLL不是32位版本"); // return; //} //DestroyAllBuiltInMaterial(); //DestroyAllBuiltInShader(); isBuildingPackage = true; Console.Clear(); SaveAndRefershAssets(); Dictionary <string, AssetBundleManager.PackageNode> OldResFileList = new Dictionary <string, AssetBundleManager.PackageNode>(); Dictionary <string, AssetBundleManager.PackageNode> OldOtherFileList = new Dictionary <string, AssetBundleManager.PackageNode>(); //打包之前,先吧资源列表加载进来,后面用于做更新对比 AssetBundleManager.LoadPackageList(GetEditorAssetPackagePatchRoot() + AssetBundleManager.AssetPackageListPatch, OldResFileList, OldOtherFileList); /* * 先生成预制体配置,因为有的资源再导入之前是没有assetbundle的 */ EditorLog.LogInfo("正在计算预制体信息....", true); if (BuildPrePrefabConfig || BuildAll) { PreGeneratePrefabConfig(); SaveAndRefershAssets(); } if (BuildPacakage || BuildAll) { EditorLog.LogInfo("正在打包资源文件....", true); if (!System.IO.Directory.Exists(AssetBundleManager.FullAssetPackagePathRoot) && !File.Exists(AssetBundleManager.FullAssetPackagePathRoot)) { System.IO.Directory.CreateDirectory(AssetBundleManager.FullAssetPackagePathRoot); } BuildPipeline.BuildAssetBundles(AssetBundleManager.FullAssetPackagePathRoot, BuildAssetBundleOptions.UncompressedAssetBundle | BuildAssetBundleOptions.DeterministicAssetBundle, Version_64Bit ? BuildTarget.StandaloneWindows64 : BuildTarget.StandaloneWindows); SaveAndRefershAssets(); } BuildCurrAssetBundleList(); if (BuildUIConfig || BuildAll) { EditorLog.LogInfo("正在计算UI配置....", true); GenerateUIConfig(); } if (BuildSceneConfig || BuildAll) { EditorLog.LogInfo("正在计算场景配置....", true); GenerateScenConfig(); } if (BuildScheme || BuildAll) { EditorLog.LogInfo("正在计算Scheme....", true); GenerateScheme(); ExportLightingEffectConfig(); } if (BuildPostPrefabConfig || BuildAll) { EditorLog.LogInfo("正在合并资源文件....", true); PostGeneratePrefabConfig(); } if (BuildAssetsInfo || BuildAll) { EditorLog.LogInfo("正在计算资源信息....", true); GenerateEditorAssetInfo(OldResFileList, OldOtherFileList); } SaveAndRefershAssets(); //DeleteMainfainstFile(GetEditorAssetPackagePatchRoot()); isBuildingPackage = false; EditorLog.LogInfo("正在修复打包错误文件...", true); if (AssetBundleImporterFixedEditor.DoImporterFixed("CopyEditorLog_BuildPackage.log", "FixedFillPathInfo_BuildPackage.txt")) { foreach (AssetBundleImporterFixedEditor.FixedPathNode path in AssetBundleImporterFixedEditor.FixedFilePath) { EditorLog.LogInfo("修复文件成功:" + path.getDesc() + ",可重新打包或者下次打包...", true); } CreateFileHelper(GetCommand_NeedToRePackingAssets()); } else { EditorLog.LogInfo("没有发现需要修复的文件...", true); } }