No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BoltFlow.cs 2.4KB

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