// Runs on error log - We do this because sometimes compiler errors can stop the import from working and we want to catch this as soon as possible. private static void Application_logMessageReceived(string condition, string stackTrace, LogType type) { if (type == LogType.Error) { CDBDefineManager.RefreshDefines(); } }
// Runs on editor start static CDBDefineCompileListener() { CDBDefineManager.RefreshDefines(); Application.logMessageReceived += Application_logMessageReceived; Application.logMessageReceivedThreaded += Application_logMessageReceived; }
// Before we run a build public void OnPreprocessBuild(BuildReport report) { CDBDefineManager.RefreshDefines(); }