Skip to content

Instantly share code, notes, and snippets.

@solkar
Created May 19, 2017 08:52
Show Gist options
  • Save solkar/2672834cea9be467c1eb39a495218bf4 to your computer and use it in GitHub Desktop.
Save solkar/2672834cea9be467c1eb39a495218bf4 to your computer and use it in GitHub Desktop.
UnityEditor script to clear shader cache
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.IO;
public class ClearShaderCache : MonoBehaviour
{
[MenuItem("Tools/Clear shader cache")]
static public void ClearShaderCache_Command()
{
var shaderCachePath = Path.Combine( Application.dataPath , "../Library/ShaderCache");
Directory.Delete( shaderCachePath , true );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment