public override void Run()
        {
            // Port our generated code (including project settings) to the new generated folder
            // Todo: Our generated projects settings need to be merged (old assemblies have been merged into Core)
            foreach (var p in PluginContainer.plugins)
            {
                var oldGeneratedDirectoryPath = Path.Combine(Paths.assets, "Ludiq", p.id, "Generated");
                if (Directory.Exists(oldGeneratedDirectoryPath))
                {
                    Directory.Delete(p.paths.persistentGenerated, true);
                    Directory.Move(oldGeneratedDirectoryPath, p.paths.persistentGenerated);
                }
            }

            // Fix script references
            ScriptReferenceResolver.Run();

            // TODO: Need to fix our EditorPrefs as they're stored outside the project (Registry for windows)

            foreach (var p in PluginContainer.plugins)
            {
                p.configuration.Initialize();
            }

            AssetDatabase.Refresh();
        }
Пример #2
0
        public override void Run()
        {
            RemoveLegacyPackageFiles();

            // We need to clear our cached types so that legacy types (Bolt.x, Ludiq.y, etc) aren't held in memory
            // by name. When we deserialize our graphs anew, we need to deserialize them into their new types (with new
            // namespaces) and the cached type lookup will interfere with that. See RuntimeCodebase.TryDeserializeType()
            RuntimeCodebase.ClearCachedTypes();

            RuntimeCodebase.disallowedAssemblies.Add("Bolt.Core.Editor");
            RuntimeCodebase.disallowedAssemblies.Add("Bolt.Core.Runtime");
            RuntimeCodebase.disallowedAssemblies.Add("Bolt.Flow.Editor");
            RuntimeCodebase.disallowedAssemblies.Add("Bolt.Flow.Runtime");
            RuntimeCodebase.disallowedAssemblies.Add("Bolt.State.Editor");
            RuntimeCodebase.disallowedAssemblies.Add("Bolt.State.Runtime");
            RuntimeCodebase.disallowedAssemblies.Add("Ludiq.Core.Editor");
            RuntimeCodebase.disallowedAssemblies.Add("Ludiq.Core.Runtime");
            RuntimeCodebase.disallowedAssemblies.Add("Ludiq.Graphs.Editor");
            RuntimeCodebase.disallowedAssemblies.Add("Ludiq.Graphs.Runtime");

            ScriptReferenceResolver.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_1_4_13_to_1_5_1.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
            }
        }
Пример #3
0
        public void OnGUI()
        {
            GUILayout.Space(5f);

            GUILayout.Label(title, EditorStyles.boldLabel);

            GUILayout.Space(5f);

            if (GUILayout.Button(buttonLabel, Styles.defaultsButton))
            {
                ScriptReferenceResolver.Run();
            }
        }