static AssemblyProcessorTrigger()
        {
            if (!AssemblyProcessorManager.Enabled)
            {
                return;
            }

            var  isReloading         = new EditorPrefBool("AssemblyProcessorManager_IsReloadingScripts");
            bool wasReloadingScripts = isReloading.Value;

            isReloading.Value = false;

            if (!wasReloadingScripts && AssemblyProcessorManager.LockAndProcessAssemblies())
            {
                isReloading.Value = true;
                InternalEditorUtility.RequestScriptReload();
            }
        }
Пример #2
0
        public static void OnPreferencesGUI()
        {
            EditorHelper.BeginBox("Assembly Processor");

            bool enabled = AssemblyProcessorManager.Enabled;

            EditorGUI.BeginChangeCheck();
            enabled = EditorGUILayout.Toggle("Enabled", enabled);
            if (EditorGUI.EndChangeCheck())
            {
                AssemblyProcessorManager.Enabled = enabled;
            }

            if (GUILayout.Button("Force Process Assemblies"))
            {
                AssemblyProcessorManager.LockAndProcessAssemblies();
                EditorUtility.RequestScriptReload();

                Debug.Log("Assemblies Processed");
            }

            EditorHelper.EndBox();
        }