public override void Run() { plugin.configuration.Initialize(); try { MigrateProjectSettings(); } #pragma warning disable 168 catch (Exception e) #pragma warning restore 168 { Debug.LogWarning("There was a problem migrating your Visual Scripting project settings. Be sure to check them in Edit -> Project Settings -> Visual Scripting"); #if VISUAL_SCRIPT_DEBUG_MIGRATION Debug.LogError(e); #endif } try { MigrationUtility_Asset_to_Package.MigrateEditorPreferences(this.plugin); } #pragma warning disable 168 catch (Exception e) #pragma warning restore 168 { Debug.LogWarning("There was a problem migrating your Visual Scripting editor preferences. Be sure to check them in Edit -> Preferences -> Visual Scripting"); #if VISUAL_SCRIPT_DEBUG_MIGRATION Debug.LogError(e); #endif } UnitBase.Rebuild(); }
public override void Run() { // Need to reset our project settings metadata list to point to the new project settings asset and // underlying dictionary. That way when it gets saved we don't overwrite the files data BoltFlow.Configuration.LoadProjectSettings(); UnitBase.Rebuild(); }
public void OnGUI() { showAssembly = EditorGUILayout.Foldout(showAssembly, new GUIContent(titleAssembly, descriptionAssembly)); if (showAssembly) { GUILayout.BeginVertical(Styles.background, GUILayout.ExpandHeight(true)); float height = LudiqGUI.GetInspectorHeight(null, assemblyOptionsMetadata, Styles.optionsWidth, GUIContent.none); EditorGUI.BeginChangeCheck(); var position = GUILayoutUtility.GetRect(Styles.optionsWidth, height); LudiqGUI.Inspector(assemblyOptionsMetadata, position, GUIContent.none); if (EditorGUI.EndChangeCheck()) { assemblyOptionsMetadata.Save(); Codebase.UpdateSettings(); } if (GUILayout.Button("Reset to Defaults", Styles.defaultsButton)) { assemblyOptionsMetadata.Reset(true); assemblyOptionsMetadata.Save(); } LudiqGUI.EndVertical(); } if (GUILayout.Button(completeLabel, Styles.defaultsButton)) { UnitBase.Rebuild(); EditorUtility.DisplayDialog("Visual Script", "Regenerate Nodes completed", "OK"); } }