public static void TakeSnapshot() { if (!mSnapshot) { string settingsPath = BuildPipelineAsset.GetExternalGlobalPath(PROJECT_SETTINGS_PATH); string settingsPathTemp = BuildPipelineAsset.GetExternalGlobalPath(PROJECT_SETTINGS_TEMP_PATH); File.Copy(settingsPath, settingsPathTemp, true); mSnapshot = true; Debug.Log("Take PlayerSettings Snapshot succeeded"); } }
public static void ApplySnapshot() { string settingsPath = BuildPipelineAsset.GetExternalGlobalPath(PROJECT_SETTINGS_PATH); string settingsPathTemp = BuildPipelineAsset.GetExternalGlobalPath(PROJECT_SETTINGS_TEMP_PATH); if (File.Exists(settingsPathTemp)) { File.Copy(settingsPathTemp, settingsPath, true); File.Delete(settingsPathTemp); mSnapshot = false; Debug.Log("Apply PlayerSettings Snapshot succeeded"); AssetDatabase.Refresh(); } }
public void DeletePackagingCacheFolders() { string[] deletePaths = BuildPipelineAsset.NeedDeletePaths; if (deletePaths != null && deletePaths.Length > 0) { foreach (var assetPath in deletePaths) { string fullpath = BuildPipelineAsset.GetExternalGlobalPath(assetPath); if (string.IsNullOrEmpty(fullpath)) { continue; } BuildPipelineCommonTools.FileUtils.DeleteFolder(fullpath); } } AssetDatabase.Refresh(); }