File size: 2,429 Bytes
18a519f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | using System.Collections.Generic;
namespace Unity.VisualScripting
{
[Plugin(ID)]
[PluginDependency(BoltCore.ID)]
[Product(BoltProduct.ID)]
[PluginRuntimeAssembly("Unity." + ID)]
public sealed class BoltFlow : Plugin
{
public BoltFlow()
{
instance = this;
}
public static BoltFlow instance { get; private set; }
[RenamedFrom("Bolt.Flow")]
public const string ID = "VisualScripting.Flow";
public static BoltFlowManifest Manifest => (BoltFlowManifest)instance?.manifest;
public static BoltFlowConfiguration Configuration => (BoltFlowConfiguration)instance?.configuration;
public static BoltFlowResources Resources => (BoltFlowResources)instance?.resources;
public static BoltFlowResources.Icons Icons => Resources?.icons;
public static BoltFlowPaths Paths => (BoltFlowPaths)instance?.paths;
public const string LegacyRuntimeDllGuid = "a040fb66244a7f54289914d98ea4ef7d";
public const string LegacyEditorDllGuid = "6cb65bfc2ee1c854ca1382175f3aba91";
public override IEnumerable<ScriptReferenceReplacement> scriptReferenceReplacements
{
get
{
#pragma warning disable 618
yield return ScriptReferenceReplacement.From<ScriptMachine>(ScriptReference.Dll(LegacyRuntimeDllGuid, "Bolt", "FlowMachine"));
yield return ScriptReferenceReplacement.From<ScriptGraphAsset>(ScriptReference.Dll(LegacyRuntimeDllGuid, "Bolt", "FlowMacro"));
// Variables moved to Bolt.Core assembly in v.1.3
yield return ScriptReferenceReplacement.From<Variables>(ScriptReference.Dll(LegacyRuntimeDllGuid, "Bolt", "Variables"));
yield return ScriptReferenceReplacement.From<SceneVariables>(ScriptReference.Dll(LegacyRuntimeDllGuid, "Bolt", "SceneVariables"));
yield return ScriptReferenceReplacement.From<VariablesAsset>(ScriptReference.Dll(LegacyRuntimeDllGuid, "Bolt", "VariablesAsset"));
#pragma warning restore 618
}
}
public override IEnumerable<string> tips
{
get
{
yield return "Did you know you can dance?";
yield return "Lorem ipsum dolor sit amet";
}
}
public override void RunAction()
{
UnitBase.Build(true);
}
}
}
|