test
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(ID)]
|
||||
[PluginDependency(BoltCore.ID)]
|
||||
[Product(BoltProduct.ID)]
|
||||
[PluginRuntimeAssembly("Unity." + ID)]
|
||||
public sealed class BoltState : Plugin
|
||||
{
|
||||
[RenamedFrom("Bolt.State")]
|
||||
public const string ID = "VisualScripting.State";
|
||||
|
||||
public BoltState() : base()
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
|
||||
public static BoltState instance { get; private set; }
|
||||
|
||||
public static BoltStateManifest Manifest => (BoltStateManifest)instance?.manifest;
|
||||
public static BoltStateConfiguration Configuration => (BoltStateConfiguration)instance?.configuration;
|
||||
public static BoltStateResources Resources => (BoltStateResources)instance?.resources;
|
||||
public static BoltStateResources.Icons Icons => Resources?.icons;
|
||||
public const string LegacyRuntimeDllGuid = "dcd2196c4e9166f499793f2007fcda35";
|
||||
public const string LegacyEditorDllGuid = "25cf173c22a896d44ae550407b10ed98";
|
||||
|
||||
public override IEnumerable<ScriptReferenceReplacement> scriptReferenceReplacements
|
||||
{
|
||||
get
|
||||
{
|
||||
#pragma warning disable 618
|
||||
yield return ScriptReferenceReplacement.From<StateMachine>(ScriptReference.Dll(LegacyRuntimeDllGuid, "Bolt", "StateMachine"));
|
||||
yield return ScriptReferenceReplacement.From<StateGraphAsset>(ScriptReference.Dll(LegacyRuntimeDllGuid, "Bolt", "StateMacro"));
|
||||
#pragma warning restore 618
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f920ee4f22d664b36925352e3b321895
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,35 @@
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
public sealed class BoltStateConfiguration : PluginConfiguration
|
||||
{
|
||||
private BoltStateConfiguration(BoltState plugin) : base(plugin) { }
|
||||
|
||||
public override string header => "State Graphs";
|
||||
|
||||
/// <summary>
|
||||
/// Determines under which condition events should be shown in state nodes.
|
||||
/// </summary>
|
||||
[EditorPref]
|
||||
public StateRevealCondition statesReveal { get; set; } = StateRevealCondition.Always;
|
||||
|
||||
/// <summary>
|
||||
/// Determines under which condition event names should be shown in state transition.
|
||||
/// </summary>
|
||||
[EditorPref]
|
||||
public StateRevealCondition transitionsReveal { get; set; } = StateRevealCondition.OnHoverWithAlt;
|
||||
|
||||
/// <summary>
|
||||
/// Whether state transitions should show an arrow at their destination state. This can appear confusing when there are
|
||||
/// multiple transitions.
|
||||
/// </summary>
|
||||
[EditorPref]
|
||||
public bool transitionsEndArrow { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Whether traversed transitions should show a droplet animation.
|
||||
/// </summary>
|
||||
[EditorPref]
|
||||
public bool animateTransitions { get; set; } = true;
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dad6936c226ce49b9a651479afeb690b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,13 @@
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
public sealed class BoltStateManifest : PluginManifest
|
||||
{
|
||||
private BoltStateManifest(BoltState plugin) : base(plugin) { }
|
||||
|
||||
public override string name => "Visual Scripting State";
|
||||
public override string author => "";
|
||||
public override string description => "State-machine based visual scripting.";
|
||||
public override SemanticVersion version => PackageVersionUtility.version;
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 68a1715d9bf874bd7ae73ff9648bea1b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,36 @@
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
public sealed class BoltStateResources : PluginResources
|
||||
{
|
||||
private BoltStateResources(BoltState plugin) : base(plugin)
|
||||
{
|
||||
icons = new Icons(this);
|
||||
}
|
||||
|
||||
public Icons icons { get; private set; }
|
||||
|
||||
public override void LateInitialize()
|
||||
{
|
||||
icons.Load();
|
||||
}
|
||||
|
||||
public class Icons
|
||||
{
|
||||
public Icons(BoltStateResources resources)
|
||||
{
|
||||
this.resources = resources;
|
||||
}
|
||||
|
||||
private readonly BoltStateResources resources;
|
||||
public EditorTexture graph { get; private set; }
|
||||
public EditorTexture state { get; private set; }
|
||||
|
||||
public void Load()
|
||||
{
|
||||
graph = typeof(StateGraph).Icon();
|
||||
state = typeof(State).Icon();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 84e6afc294cf242f7b5b66254c763183
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac1f64ab829894a92a9a4727bbee1721
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class Changelog_1_0_0 : PluginChangelog
|
||||
{
|
||||
public Changelog_1_0_0(Plugin plugin) : base(plugin) { }
|
||||
|
||||
public override string description => "Initial Release";
|
||||
public override SemanticVersion version => "1.0.0";
|
||||
public override DateTime date => new DateTime(2017, 07, 26);
|
||||
public override IEnumerable<string> changes => Enumerable.Empty<string>();
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7ce3ec6fc91e046a4a8911343aa505c7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class Changelog_1_0_1 : PluginChangelog
|
||||
{
|
||||
public Changelog_1_0_1(Plugin plugin) : base(plugin) { }
|
||||
|
||||
public override SemanticVersion version => "1.0.1";
|
||||
public override DateTime date => new DateTime(2017, 08, 01);
|
||||
|
||||
public override IEnumerable<string> changes
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return "[Fixed] State header icon size on retina displays";
|
||||
yield return "[Fixed] Pasting into state transition";
|
||||
yield return "[Fixed] Transition events not being triggered from state entry";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dcc6f0c1385114ccf94f9a7112c95d79
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class Changelog_1_0_2 : PluginChangelog
|
||||
{
|
||||
public Changelog_1_0_2(Plugin plugin) : base(plugin) { }
|
||||
|
||||
public override SemanticVersion version => "1.0.2";
|
||||
public override DateTime date => new DateTime(2017, 09, 08);
|
||||
|
||||
public override IEnumerable<string> changes
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return "[Fixed] Order-of-operations issues with transitions and updates";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 32396d7cafec147a8b62dce93b2c8f33
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class Changelog_1_1_1 : PluginChangelog
|
||||
{
|
||||
public Changelog_1_1_1(Plugin plugin) : base(plugin) { }
|
||||
|
||||
public override SemanticVersion version => "1.1.1";
|
||||
public override DateTime date => new DateTime(2017, 10, 10);
|
||||
|
||||
public override IEnumerable<string> changes
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return "[Changed] Default transitions to not include Update event anymore";
|
||||
yield return "[Fixed] Inactive states sometimes updating";
|
||||
yield return "[Optimized] Editor recursion performance";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9bae4d3962b184e788831cefda9e20bb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class Changelog_1_1_2 : PluginChangelog
|
||||
{
|
||||
public Changelog_1_1_2(Plugin plugin) : base(plugin) { }
|
||||
|
||||
public override SemanticVersion version => "1.1.2";
|
||||
public override DateTime date => new DateTime(2017, 10, 16);
|
||||
|
||||
public override IEnumerable<string> changes
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return "[Fixed] Issue with dragging";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b59c9165726434ecc96fc359de597099
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class Changelog_1_1_3 : PluginChangelog
|
||||
{
|
||||
public Changelog_1_1_3(Plugin plugin) : base(plugin) { }
|
||||
|
||||
public override SemanticVersion version => "1.1.3";
|
||||
public override DateTime date => new DateTime(2017, 10, 30);
|
||||
|
||||
public override IEnumerable<string> changes
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return "[Fixed] Deserialization error due to nester owner being serialized";
|
||||
yield return "[Fixed] Descriptor error with nested events";
|
||||
yield return "[Fixed] Event listening state being serialized";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 216a0cbaede884a7785cb137b90301b1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class Changelog_1_2_2 : PluginChangelog
|
||||
{
|
||||
public Changelog_1_2_2(Plugin plugin) : base(plugin) { }
|
||||
|
||||
public override SemanticVersion version => "1.2.2";
|
||||
public override DateTime date => new DateTime(2017, 12, 04);
|
||||
|
||||
public override IEnumerable<string> changes
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return "[Added] Any State";
|
||||
yield return "[Added] Droplet animations for transitions";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9da5e47993cc143868fbaceb76639261
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class Changelog_1_2_3 : PluginChangelog
|
||||
{
|
||||
public Changelog_1_2_3(Plugin plugin) : base(plugin) { }
|
||||
|
||||
public override SemanticVersion version => "1.2.3";
|
||||
public override DateTime date => new DateTime(2018, 01, 25);
|
||||
|
||||
public override IEnumerable<string> changes
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return "[Added] Trigger enter / exit state events in transitions";
|
||||
yield return "[Fixed] Fixed Update and Late Update not firing in super states";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 237934135a3b1433eade240044ab5490
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class Changelog_1_2_4 : PluginChangelog
|
||||
{
|
||||
public Changelog_1_2_4(Plugin plugin) : base(plugin) { }
|
||||
|
||||
public override SemanticVersion version => "1.2.4";
|
||||
public override DateTime date => new DateTime(2018, 02, 26);
|
||||
|
||||
public override IEnumerable<string> changes
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return "[Fixed] Manual events not triggering in state units";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a4c4880bf45e4dcd92c58a4898e83f8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class Changelog_1_3_0 : PluginChangelog
|
||||
{
|
||||
public Changelog_1_3_0(Plugin plugin) : base(plugin) { }
|
||||
|
||||
public override SemanticVersion version => "1.3.0";
|
||||
public override DateTime date => new DateTime(2018, 04, 06);
|
||||
|
||||
public override IEnumerable<string> changes
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return "[Fixed] State unit relations";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7199fb71ac8b447d28bcc153d72b3147
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class Changelog_1_4_0f6 : PluginChangelog
|
||||
{
|
||||
public Changelog_1_4_0f6(Plugin plugin) : base(plugin) { }
|
||||
|
||||
public override SemanticVersion version => "1.4.0f6";
|
||||
public override DateTime date => new DateTime(2018, 09, 06);
|
||||
|
||||
public override IEnumerable<string> changes
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return "[Fixed] On Enter State and On Exit State events not firing in super units";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class Changelog_1_4_0f10 : PluginChangelog
|
||||
{
|
||||
public Changelog_1_4_0f10(Plugin plugin) : base(plugin) { }
|
||||
|
||||
public override SemanticVersion version => "1.4.0f10";
|
||||
public override DateTime date => new DateTime(2018, 10, 29);
|
||||
|
||||
public override IEnumerable<string> changes
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return "[Fixed] Inactive states starting to listen after undo";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29a9c8f8714ef4a7a87311418ea65ed6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class Changelog_1_4_1 : PluginChangelog
|
||||
{
|
||||
public Changelog_1_4_1(Plugin plugin) : base(plugin) { }
|
||||
|
||||
public override SemanticVersion version => "1.4.1";
|
||||
|
||||
public override DateTime date => new DateTime(2019, 01, 22);
|
||||
|
||||
public override IEnumerable<string> changes
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return "[Changed] Allowed state machines to receive Start, OnEnable and OnDisable events for consistency";
|
||||
yield return "[Fixed] Graph data type mismatch in event listening handlers for state graphs";
|
||||
yield return "[Fixed] Non instantiated state graphs showing force enter / force exit contextual menu options";
|
||||
yield return "[Fixed] Live-added Any States not sending transitions";
|
||||
yield return "[Fixed] Any States not exiting properly when stopping the graph";
|
||||
yield return "[Fixed] Live-added start states not getting automatically entered";
|
||||
yield return "[Fixed] Force Enter and Force Exit showing in Any State context menu";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e8cdb556e8ed4b8e919d6d39e165125
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0b1525bda7254587be55ddfe956a7b96
|
||||
timeCreated: 1605804310
|
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class Migration_1_5_1_to_1_5_2 : PluginMigration
|
||||
{
|
||||
internal Migration_1_5_1_to_1_5_2(Plugin plugin) : base(plugin)
|
||||
{
|
||||
order = 1;
|
||||
}
|
||||
|
||||
public override SemanticVersion @from => "1.5.1";
|
||||
public override SemanticVersion to => "1.5.2";
|
||||
|
||||
public override void Run()
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
private static void MigrateProjectSettings()
|
||||
{
|
||||
BoltState.Configuration.LoadOrCreateProjectSettingsAsset();
|
||||
|
||||
var legacyProjectSettingsAsset = MigrationUtility_1_5_1_to_1_5_2.GetLegacyProjectSettingsAsset("VisualScripting.State");
|
||||
if (legacyProjectSettingsAsset != null)
|
||||
{
|
||||
BoltState.Configuration.projectSettingsAsset.Merge(legacyProjectSettingsAsset);
|
||||
}
|
||||
|
||||
BoltState.Configuration.SaveProjectSettingsAsset(true);
|
||||
BoltState.Configuration.ResetProjectSettingsMetadata();
|
||||
}
|
||||
}
|
||||
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class DeprecatedSavedVersionLoader_1_5_1 : PluginDeprecatedSavedVersionLoader
|
||||
{
|
||||
internal DeprecatedSavedVersionLoader_1_5_1(Plugin plugin) : base(plugin) { }
|
||||
|
||||
public override SemanticVersion @from => "1.5.1";
|
||||
|
||||
public override bool Run(out SemanticVersion savedVersion)
|
||||
{
|
||||
var manuallyParsedVersion = MigrationUtility_1_5_1_to_1_5_2.TryManualParseSavedVersion("VisualScripting.State");
|
||||
savedVersion = manuallyParsedVersion;
|
||||
|
||||
return savedVersion != "0.0.0";
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6753fa3367ac4986a92909ed6eb78772
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class Migration_1_6_to_1_7 : PluginMigration
|
||||
{
|
||||
internal Migration_1_6_to_1_7(Plugin plugin) : base(plugin)
|
||||
{
|
||||
order = 2;
|
||||
}
|
||||
|
||||
public override SemanticVersion @from => "1.6.1000";
|
||||
public override SemanticVersion to => "1.7.0-pre.0";
|
||||
|
||||
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
|
||||
BoltState.Configuration.LoadProjectSettings();
|
||||
}
|
||||
}
|
||||
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class DeprecatedSavedVersionLoader_1_6_1 : PluginDeprecatedSavedVersionLoader
|
||||
{
|
||||
public DeprecatedSavedVersionLoader_1_6_1(Plugin plugin) : base(plugin) { }
|
||||
|
||||
public override SemanticVersion @from => "1.6.1";
|
||||
|
||||
public override bool Run(out SemanticVersion savedVersion)
|
||||
{
|
||||
savedVersion = new SemanticVersion();
|
||||
try
|
||||
{
|
||||
var legacyProjectSettingsAsset = MigrationUtility_1_6_to_1_7.GetLegacyProjectSettingsAsset("VisualScripting.State");
|
||||
if (legacyProjectSettingsAsset == null)
|
||||
return false;
|
||||
|
||||
savedVersion = (SemanticVersion)legacyProjectSettingsAsset["savedVersion"];
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55f9606c92224790823f7ac7fd2c8d41
|
||||
timeCreated: 1618943136
|
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class Migration_Asset_to_Package : PluginMigration
|
||||
{
|
||||
public Migration_Asset_to_Package(Plugin plugin) : base(plugin)
|
||||
{
|
||||
order = 2;
|
||||
}
|
||||
|
||||
public override SemanticVersion @from => "1.4.1000";
|
||||
public override SemanticVersion to => "1.5.0-pre.0";
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
private static void MigrateProjectSettings()
|
||||
{
|
||||
// Bolt.State -> VisualScripting.State
|
||||
BoltState.Configuration.LoadOrCreateProjectSettingsAsset();
|
||||
|
||||
var legacyProjectSettingsAsset = MigrationUtility_Asset_to_Package.GetLegacyProjectSettingsAsset("Bolt.State");
|
||||
if (legacyProjectSettingsAsset != null)
|
||||
{
|
||||
BoltState.Configuration.projectSettingsAsset.Merge(legacyProjectSettingsAsset);
|
||||
}
|
||||
|
||||
BoltState.Configuration.SaveProjectSettingsAsset(true);
|
||||
BoltState.Configuration.ResetProjectSettingsMetadata();
|
||||
}
|
||||
}
|
||||
|
||||
[Plugin(BoltState.ID)]
|
||||
internal class DeprecatedSavedVersionLoader_Bolt_AssetStore : PluginDeprecatedSavedVersionLoader
|
||||
{
|
||||
public DeprecatedSavedVersionLoader_Bolt_AssetStore(Plugin plugin) : base(plugin) { }
|
||||
|
||||
public override SemanticVersion @from => "1.4.13";
|
||||
|
||||
public override bool Run(out SemanticVersion savedVersion)
|
||||
{
|
||||
var manuallyParsedVersion = MigrationUtility_Asset_to_Package.TryManualParseSavedVersion("Bolt.State");
|
||||
savedVersion = manuallyParsedVersion;
|
||||
|
||||
return savedVersion != "0.0.0";
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 80b5f06f2b254106834105b126a44f19
|
||||
timeCreated: 1605804325
|
Reference in New Issue
Block a user