Created
February 16, 2015 11:33
-
-
Save seaders/c483737b87a69f2b2f08 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| using UnityEditor; | |
| using System; | |
| using Mono.Cecil; | |
| [InitializeOnLoadAttribute] | |
| static class SixMinutePostprocess | |
| { | |
| static SixMinutePostprocess() | |
| { | |
| Console.WriteLine("Init AssemblyPostProcessor"); | |
| string path = "Library/ScriptAssemblies/Assembly-CSharp.dll"; | |
| // Lock assemblies while they may be altered | |
| EditorApplication.LockReloadAssemblies(); | |
| ModuleDefinition module = ModuleDefinition.ReadModule(path); | |
| module.Write(path); | |
| // Unlock now that we're done | |
| EditorApplication.UnlockReloadAssemblies(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment