using UnityEngine; using UnityEditor; using UnityEngine.SceneManagement; using System.Collections; using System.Collections.Generic; using System.IO; public class ftClearCache { static void Clear(string[] files) { for(int i=0; i(); var defaultPath = System.Environment.GetEnvironmentVariable("TEMP", System.EnvironmentVariableTarget.Process) + "\\frender"; var sceneCount = SceneManager.sceneCount; for(int i=0; i(); if (storage == null) continue; list.Add(storage.renderSettingsTempPath == "" ? defaultPath : storage.renderSettingsTempPath); } foreach(var tempPath in list) { if (EditorUtility.DisplayDialog("Bakery", "Clear cache from '" + tempPath + "'?", "OK", "Cancel")) { var files = Directory.GetFiles(tempPath, "*.lz4"); Clear(files); files = Directory.GetFiles(tempPath, "*.dds"); Clear(files); files = Directory.GetFiles(tempPath, "*.bin"); Clear(files); files = Directory.GetFiles(tempPath, "lastscene.txt"); Clear(files); } } Debug.Log("Done"); } }