Last active
March 8, 2017 14:09
-
-
Save taibenvenuti/20c05f7988e8d64dda91bdd931c6a256 to your computer and use it in GitHub Desktop.
Generate Shader List
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var shaderList = new List<string>(); | |
var shaders = Resources.FindObjectsOfTypeAll<Shader>(); | |
for (uint i = 0; i < shaders.Length; i++) | |
{ | |
var shader = shaders[i]; | |
if (shader == null) continue; | |
Debug.Log(shader); | |
shaderList.Add(shader.ToString()); | |
} | |
shaderList.Sort(); | |
var s = shaders.Length + " shaders found...\n\n"; | |
foreach(var name in shaderList) | |
{ | |
s = s + name + "\n"; | |
} | |
var path = Path.Combine(ColossalFramework.IO.DataLocation.addonsPath, "ShadersList.txt"); | |
File.WriteAllText(path, s); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment