UnityEditor.Lightmapping.ClearDiskCache C# (CSharp) Method

ClearDiskCache() private method

private ClearDiskCache ( ) : void
return void
        public static extern void ClearDiskCache();
        /// <summary>

Usage Example

 private void ShowGICache()
 {
     GUILayout.BeginHorizontal(new GUILayoutOption[0]);
     EditorGUILayout.PrefixLabel(PreferencesWindow.Styles.maxCacheSize, EditorStyles.popup);
     this.m_GICacheSettings.m_MaximumSize = EditorGUILayout.IntSlider(this.m_GICacheSettings.m_MaximumSize, 5, 100, new GUILayoutOption[0]);
     this.WritePreferences();
     GUILayout.EndHorizontal();
     GUILayout.BeginHorizontal(new GUILayoutOption[0]);
     if (Lightmapping.isRunning)
     {
         GUIContent gUIContent = EditorGUIUtility.TextContent(PreferencesWindow.Styles.cantChangeCacheSettings.text);
         EditorGUILayout.HelpBox(gUIContent.text, MessageType.Warning, true);
     }
     GUILayout.EndHorizontal();
     EditorGUI.BeginDisabledGroup(Lightmapping.isRunning);
     this.m_GICacheSettings.m_EnableCustomPath = EditorGUILayout.Toggle(PreferencesWindow.Styles.customCacheLocation, this.m_GICacheSettings.m_EnableCustomPath, new GUILayoutOption[0]);
     if (this.m_GICacheSettings.m_EnableCustomPath)
     {
         GUIStyle popup = EditorStyles.popup;
         GUILayout.BeginHorizontal(new GUILayoutOption[0]);
         EditorGUILayout.PrefixLabel(PreferencesWindow.Styles.cacheFolderLocation, popup);
         Rect       rect    = GUILayoutUtility.GetRect(GUIContent.none, popup);
         GUIContent content = (!string.IsNullOrEmpty(this.m_GICacheSettings.m_CachePath)) ? new GUIContent(this.m_GICacheSettings.m_CachePath) : PreferencesWindow.Styles.browse;
         if (EditorGUI.ButtonMouseDown(rect, content, FocusType.Native, popup))
         {
             string cachePath = this.m_GICacheSettings.m_CachePath;
             string text      = EditorUtility.OpenFolderPanel(PreferencesWindow.Styles.browseGICacheLocation.text, cachePath, string.Empty);
             if (!string.IsNullOrEmpty(text))
             {
                 this.m_GICacheSettings.m_CachePath = text;
                 this.WritePreferences();
             }
         }
         GUILayout.EndHorizontal();
     }
     else
     {
         this.m_GICacheSettings.m_CachePath = string.Empty;
     }
     this.m_GICacheSettings.m_CompressionLevel = ((!EditorGUILayout.Toggle(PreferencesWindow.Styles.cacheCompression, this.m_GICacheSettings.m_CompressionLevel == 1, new GUILayoutOption[0])) ? 0 : 1);
     if (GUILayout.Button(PreferencesWindow.Styles.cleanCache, new GUILayoutOption[]
     {
         GUILayout.Width(120f)
     }))
     {
         Lightmapping.Clear();
         Lightmapping.ClearDiskCache();
     }
     if (Lightmapping.diskCacheSize >= 0L)
     {
         GUILayout.Label(PreferencesWindow.Styles.cacheSizeIs.text + " " + EditorUtility.FormatBytes(Lightmapping.diskCacheSize), new GUILayoutOption[0]);
     }
     else
     {
         GUILayout.Label(PreferencesWindow.Styles.cacheSizeIs.text + " is being calculated...", new GUILayoutOption[0]);
     }
     GUILayout.Label(PreferencesWindow.Styles.cacheFolderLocation.text + ":", new GUILayoutOption[0]);
     GUILayout.Label(Lightmapping.diskCachePath, PreferencesWindow.constants.cacheFolderLocation, new GUILayoutOption[0]);
     EditorGUI.EndDisabledGroup();
 }
All Usage Examples Of UnityEditor.Lightmapping::ClearDiskCache