From f9da36aa7bfaf6aa1d4eb34a687b7bc6ffda46c2 Mon Sep 17 00:00:00 2001 From: Paul Stamp Date: Mon, 23 Sep 2024 11:57:02 +0100 Subject: [PATCH 1/2] Simplified the uss by importing shared styles --- .../Resources/CounterWithTargetNodeView.uss | 144 ------------------ Editor/Resources/EntryNodeView.uss | 62 -------- Editor/Resources/ExitNodeView.uss | 62 -------- Editor/Resources/Nodes.meta | 3 + Editor/Resources/Nodes/BaseNode.uss | 21 +++ Editor/Resources/Nodes/BaseNode.uss.meta | 3 + .../Resources/{ => Nodes}/CounterNodeView.uss | 85 +++++------ .../{ => Nodes}/CounterNodeView.uss.meta | 0 .../Nodes/CounterWithTargetNodeView.uss | 33 ++++ .../CounterWithTargetNodeView.uss.meta | 0 .../Resources/{ => Nodes}/DelayNodeView.uss | 83 ++++------ .../{ => Nodes}/DelayNodeView.uss.meta | 0 Editor/Resources/Nodes/EntryNodeView.uss | 46 ++++++ .../{ => Nodes}/EntryNodeView.uss.meta | 0 Editor/Resources/Nodes/ExitNodeView.uss | 47 ++++++ .../{ => Nodes}/ExitNodeView.uss.meta | 0 Editor/Resources/{ => Nodes}/JumpNodeView.uss | 26 +--- .../{ => Nodes}/JumpNodeView.uss.meta | 0 Editor/Resources/Nodes/ProgressBar.uss | 31 ++++ Editor/Resources/Nodes/ProgressBar.uss.meta | 3 + Editor/Resources/Nodes/PropertyContainer.uss | 34 +++++ .../Nodes/PropertyContainer.uss.meta | 3 + .../Resources/{ => Nodes}/RelayNodeView.uss | 55 +++---- .../{ => Nodes}/RelayNodeView.uss.meta | 0 Editor/Resources/Nodes/StateNodeView.uss | 15 ++ .../{ => Nodes}/StateNodeView.uss.meta | 0 Editor/Resources/Nodes/StickyNoteNodeView.uss | 31 ++++ .../{ => Nodes}/StickyNoteNodeView.uss.meta | 0 Editor/Resources/Nodes/SubStateNodeView.uss | 31 ++++ .../{ => Nodes}/SubStateNodeView.uss.meta | 0 Editor/Resources/Nodes/TitleBar.uss | 51 +++++++ Editor/Resources/Nodes/TitleBar.uss.meta | 3 + Editor/Resources/StateNodeView.uss | 131 ---------------- Editor/Resources/StickyNoteNodeView.uss | 112 -------------- Editor/Resources/SubStateNodeView.uss | 126 --------------- Editor/Resources/UnityDefaultRuntimeTheme.tss | 2 + .../UnityDefaultRuntimeTheme.tss.meta | 11 ++ Editor/StateGraph/Nodes/BaseStateNodeView.cs | 5 +- Editor/StateGraph/Nodes/NodeComponents.meta | 3 + .../Nodes/NodeComponents/INodeComponent.cs | 9 ++ .../NodeComponents/INodeComponent.cs.meta | 3 + .../NodeComponents/NodeStylingComponent.cs | 16 ++ .../NodeStylingComponent.cs.meta | 3 + Runtime/Data/SharedData.cs | 11 +- Runtime/StateGraph/StateMachine.cs | 1 + .../States/CounterWithTargetState.cs | 16 +- 46 files changed, 530 insertions(+), 791 deletions(-) delete mode 100644 Editor/Resources/CounterWithTargetNodeView.uss delete mode 100644 Editor/Resources/EntryNodeView.uss delete mode 100644 Editor/Resources/ExitNodeView.uss create mode 100644 Editor/Resources/Nodes.meta create mode 100644 Editor/Resources/Nodes/BaseNode.uss create mode 100644 Editor/Resources/Nodes/BaseNode.uss.meta rename Editor/Resources/{ => Nodes}/CounterNodeView.uss (67%) rename Editor/Resources/{ => Nodes}/CounterNodeView.uss.meta (100%) create mode 100644 Editor/Resources/Nodes/CounterWithTargetNodeView.uss rename Editor/Resources/{ => Nodes}/CounterWithTargetNodeView.uss.meta (100%) rename Editor/Resources/{ => Nodes}/DelayNodeView.uss (52%) rename Editor/Resources/{ => Nodes}/DelayNodeView.uss.meta (100%) create mode 100644 Editor/Resources/Nodes/EntryNodeView.uss rename Editor/Resources/{ => Nodes}/EntryNodeView.uss.meta (100%) create mode 100644 Editor/Resources/Nodes/ExitNodeView.uss rename Editor/Resources/{ => Nodes}/ExitNodeView.uss.meta (100%) rename Editor/Resources/{ => Nodes}/JumpNodeView.uss (83%) rename Editor/Resources/{ => Nodes}/JumpNodeView.uss.meta (100%) create mode 100644 Editor/Resources/Nodes/ProgressBar.uss create mode 100644 Editor/Resources/Nodes/ProgressBar.uss.meta create mode 100644 Editor/Resources/Nodes/PropertyContainer.uss create mode 100644 Editor/Resources/Nodes/PropertyContainer.uss.meta rename Editor/Resources/{ => Nodes}/RelayNodeView.uss (70%) rename Editor/Resources/{ => Nodes}/RelayNodeView.uss.meta (100%) create mode 100644 Editor/Resources/Nodes/StateNodeView.uss rename Editor/Resources/{ => Nodes}/StateNodeView.uss.meta (100%) create mode 100644 Editor/Resources/Nodes/StickyNoteNodeView.uss rename Editor/Resources/{ => Nodes}/StickyNoteNodeView.uss.meta (100%) create mode 100644 Editor/Resources/Nodes/SubStateNodeView.uss rename Editor/Resources/{ => Nodes}/SubStateNodeView.uss.meta (100%) create mode 100644 Editor/Resources/Nodes/TitleBar.uss create mode 100644 Editor/Resources/Nodes/TitleBar.uss.meta delete mode 100644 Editor/Resources/StateNodeView.uss delete mode 100644 Editor/Resources/StickyNoteNodeView.uss delete mode 100644 Editor/Resources/SubStateNodeView.uss create mode 100644 Editor/Resources/UnityDefaultRuntimeTheme.tss create mode 100644 Editor/Resources/UnityDefaultRuntimeTheme.tss.meta create mode 100644 Editor/StateGraph/Nodes/NodeComponents.meta create mode 100644 Editor/StateGraph/Nodes/NodeComponents/INodeComponent.cs create mode 100644 Editor/StateGraph/Nodes/NodeComponents/INodeComponent.cs.meta create mode 100644 Editor/StateGraph/Nodes/NodeComponents/NodeStylingComponent.cs create mode 100644 Editor/StateGraph/Nodes/NodeComponents/NodeStylingComponent.cs.meta diff --git a/Editor/Resources/CounterWithTargetNodeView.uss b/Editor/Resources/CounterWithTargetNodeView.uss deleted file mode 100644 index 071d436..0000000 --- a/Editor/Resources/CounterWithTargetNodeView.uss +++ /dev/null @@ -1,144 +0,0 @@ -/* *********** Node *********** */ - -.node { - min-width: 280px; - max-width: 540px; -} - -.node #title { -flex-direction: column; -} - -.node #title-label { - font-size: 14px; - margin-left: 10px; - margin-right: 10px; - flex-grow: 1; - -unity-text-align: middle-center; - -unity-font-style: Bold; -} - -.node #title-container { - padding-left: 10px; - padding-right: 10px; - align-items: center; - margin-top: 6px; - margin-bottom: 0px; - flex-direction: row; - width: 100% -} - -.node #title-icon { - min-width:22px; - min-height:22px; - width: 22px; - height:22px; -} - -.node #state-border { - position: absolute; - right: 0; - left: 0; - top: 0; - bottom: 0; - border-color: #4CAF50; - border-width: 2px; - border-radius: 8px; - opacity:0; - margin:1px; -} - -/* *********** Progress Bar *********** */ - -.node #progress-bar { - margin-left: 0px; - margin-right: 0px; - margin-bottom: 0px; - translate: 0px 2px; -} - -.node .unity-progress-bar__background { - background-color: #252525; -} - -.unity-progress-bar__progress { - visibility: hidden; -} - -.active-node .unity-progress-bar__progress { - visibility: visible; -} - -#progress-bar { - height: 6px; - margin:2px; -} - -.unity-progress-bar__progress { - background-color: #4CAF50; -} - -/* *********** Property Container *********** */ -#property-container { - background-color: #2E2E2E; - width: auto; - padding-bottom: 5px; - padding-top: 5px; - max-height: 200px; -} - -#property-container.has-properties { - width: auto; -} - -#property-container.has-properties #unity-content-viewport{ - padding-top:5px; - padding-bottom:5px; - padding-left:2px; - padding-right:2px; -} - -#property-container.relay { - width: 120px; -} - -#unity-content { - margin:5px; -} - -#field-container { - height: 20px; - flex-direction: row; -} - -#edit-btn { - background-color: #1d1d1d; - margin:0px; - height:100%; - width:30px; - border-radius: 5px; - align-items: center; - justify-content: center; -} - -#edit-btn-icon { - width: 80%; - height: auto; -} - -.count-field Label { - color: #a89d46; - -unity-font-style: bold; -} - -.count-field IntegerInput { - background-color: #3C3C3C; -} - -.count-field IntegerInput TextElement { - color: #969696; -} - -/*.port.output.typed #type {*/ -/* color: greenyellow;*/ -/*}*/ \ No newline at end of file diff --git a/Editor/Resources/EntryNodeView.uss b/Editor/Resources/EntryNodeView.uss deleted file mode 100644 index 173057f..0000000 --- a/Editor/Resources/EntryNodeView.uss +++ /dev/null @@ -1,62 +0,0 @@ -.node #title { - flex-direction: row; -} - -.node #title-label { - font-size: 14px; - margin-left: 18px; - margin-right: 5px; - flex-grow: 1; - -unity-text-align: middle-center; - -unity-font-style: Bold; -} - -.node #title-container { - padding-left: 10px; - padding-right: 0px; - align-items: center; - margin-top: 6px; - margin-bottom: 6px; - flex-direction: row; - width: 100% -} - -.node #title-button-container { - visibility: hidden; - width:0; - height:0; -} - -.node #title-icon { - min-width:24px; - min-height:24px; - width: 24px; - height:24px; - margin-right: -5px; -} - -.node #state-border { - position: absolute; - right: 0; - left: 0; - top: 0; - bottom: 0; - border-color: green; - border-width: 2px; - border-radius: 8px; - opacity:0; - margin:1px; -} - -Port { - height: 100%; - width: 26px; -} - -Port Label { - display: none; -} - -.node #contents { - display: none; -} diff --git a/Editor/Resources/ExitNodeView.uss b/Editor/Resources/ExitNodeView.uss deleted file mode 100644 index 8363aab..0000000 --- a/Editor/Resources/ExitNodeView.uss +++ /dev/null @@ -1,62 +0,0 @@ -.node #title { - flex-direction: row; -} - -.node #title-label { - font-size: 14px; - margin-left: 5px; - margin-right: 18px; - flex-grow: 1; - -unity-text-align: middle-center; - -unity-font-style: Bold; -} - -.node #title-container { - padding-left: 0px; - padding-right: 10px; - align-items: center; - margin-top: 6px; - margin-bottom: 6px; - flex-direction: row-reverse; - width: 100% -} - -.node #title-button-container { - visibility: hidden; - width:0; - height:0; -} - -.node #title-icon { - min-width:24px; - min-height:24px; - width: 24px; - height:24px; - margin-left: -5px; -} - -.node #state-border { - position: absolute; - right: 0; - left: 0; - top: 0; - bottom: 0; - border-color: green; - border-width: 2px; - border-radius: 8px; - opacity:0; - margin:1px; -} - -Port { - height: 100%; - width: 26px; -} - -Port Label { - display: none; -} - -.node #contents { - display: none; -} diff --git a/Editor/Resources/Nodes.meta b/Editor/Resources/Nodes.meta new file mode 100644 index 0000000..a241557 --- /dev/null +++ b/Editor/Resources/Nodes.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: de72142e45f1415fad2f5a748581594e +timeCreated: 1726896241 \ No newline at end of file diff --git a/Editor/Resources/Nodes/BaseNode.uss b/Editor/Resources/Nodes/BaseNode.uss new file mode 100644 index 0000000..32d4200 --- /dev/null +++ b/Editor/Resources/Nodes/BaseNode.uss @@ -0,0 +1,21 @@ +/* BaseNode.uss */ + +/* *********** Base Node *********** */ + +.node { + min-width: 280px; + max-width: 540px; +} + +.node #state-border { + position: absolute; + right: 0; + left: 0; + top: 0; + bottom: 0; + border-color: #4CAF50; + border-width: 2px; + border-radius: 8px; + opacity:0; + margin:1px; +} \ No newline at end of file diff --git a/Editor/Resources/Nodes/BaseNode.uss.meta b/Editor/Resources/Nodes/BaseNode.uss.meta new file mode 100644 index 0000000..627303a --- /dev/null +++ b/Editor/Resources/Nodes/BaseNode.uss.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 42f57d3c822d482192fccd574bcdc072 +timeCreated: 1726893941 \ No newline at end of file diff --git a/Editor/Resources/CounterNodeView.uss b/Editor/Resources/Nodes/CounterNodeView.uss similarity index 67% rename from Editor/Resources/CounterNodeView.uss rename to Editor/Resources/Nodes/CounterNodeView.uss index 2fcb241..1d6bfb2 100644 --- a/Editor/Resources/CounterNodeView.uss +++ b/Editor/Resources/Nodes/CounterNodeView.uss @@ -1,36 +1,21 @@ -.node #title { - flex-direction: row; - height:50px; +/* *********** CounterNodeView *********** */ +@import url("BaseNode.uss"); +@import url("ProgressBar.uss"); +@import url("TitleBar.uss"); +@import url("PropertyContainer.uss"); + +/* *********** Base Node *********** */ +.node { + min-width: auto; } -.node #title-label { - font-size: 14px; - margin-left: 18px; - margin-right: 5px; - flex-grow: 1; - -unity-text-align: middle-center; - -unity-font-style: Bold; +/* *********** Title Bar *********** */ +.node #title { + height:50px; } .node #title-container { - margin-top: 6px; margin-bottom: 6px; - flex-direction: row; -} - -.node IntegerField { - min-width: 50px; - max-width: 100px; -} - -.unity-text-element { - -unity-text-align: middle-center; -} - -.node #title-button-container { - visibility: hidden; - width:0; - height:0; } .node #title-icon { @@ -44,17 +29,33 @@ align-self: center; } -.node #state-border { - position: absolute; - right: 0; - left: 0; - top: 0; - bottom: 0; - border-color: green; - border-width: 2px; - border-radius: 8px; - opacity:0; - margin:1px; +.node #title-button-container { + visibility: hidden; + width:0; + height:0; +} + +/* *********** Property Container *********** */ +.node #contents { + display: none; +} + +.node #property-container { + flex-direction: column; +} + +#property-container { + background-color: red; +} + +/* *********** *********** */ +.node IntegerField { + min-width: 50px; + max-width: 100px; +} + +.unity-text-element { + -unity-text-align: middle-center; } Port { @@ -68,14 +69,6 @@ Port Label { display: none; } -.node #contents { - display: none; -} - -.node #property-container { - flex-direction: column; -} - .count-field Label { color: #a89d46; -unity-font-style: bold; diff --git a/Editor/Resources/CounterNodeView.uss.meta b/Editor/Resources/Nodes/CounterNodeView.uss.meta similarity index 100% rename from Editor/Resources/CounterNodeView.uss.meta rename to Editor/Resources/Nodes/CounterNodeView.uss.meta diff --git a/Editor/Resources/Nodes/CounterWithTargetNodeView.uss b/Editor/Resources/Nodes/CounterWithTargetNodeView.uss new file mode 100644 index 0000000..9217867 --- /dev/null +++ b/Editor/Resources/Nodes/CounterWithTargetNodeView.uss @@ -0,0 +1,33 @@ +/* *********** CountWithTargetNodeView *********** */ +@import url("BaseNode.uss"); +@import url("TitleBar.uss"); +@import url("ProgressBar.uss"); +@import url("PropertyContainer.uss"); + +/* *********** Base Node *********** */ +/** No Overrides **/ + +/* *********** Title Bar *********** */ +.node #title { + flex-direction: column; +} + +/* *********** Progress Bar *********** */ +/** No Overrides **/ + +/* *********** Property Container *********** */ +/** No Overrides **/ + +/* *********** *********** */ +.count-field Label { + color: #a89d46; + -unity-font-style: bold; +} + +.count-field IntegerInput { + background-color: #3C3C3C; +} + +.count-field IntegerInput TextElement { + color: #969696; +} diff --git a/Editor/Resources/CounterWithTargetNodeView.uss.meta b/Editor/Resources/Nodes/CounterWithTargetNodeView.uss.meta similarity index 100% rename from Editor/Resources/CounterWithTargetNodeView.uss.meta rename to Editor/Resources/Nodes/CounterWithTargetNodeView.uss.meta diff --git a/Editor/Resources/DelayNodeView.uss b/Editor/Resources/Nodes/DelayNodeView.uss similarity index 52% rename from Editor/Resources/DelayNodeView.uss rename to Editor/Resources/Nodes/DelayNodeView.uss index 3a7cef6..0488f1b 100644 --- a/Editor/Resources/DelayNodeView.uss +++ b/Editor/Resources/Nodes/DelayNodeView.uss @@ -1,40 +1,19 @@ -.node #title { - flex-direction: row; - height:50px; -} - -.node #title-label { - font-size: 14px; - margin-left: 18px; - margin-right: 5px; - flex-grow: 1; - -unity-text-align: middle-center; - -unity-font-style: Bold; -} +/* *********** DelayNodeView *********** */ +@import url("BaseNode.uss"); +@import url("TitleBar.uss"); -.node #title-container { - /*padding-left: 0px;*/ - /*padding-right: 0px;*/ - /*align-items: center;*/ - margin-top: 6px; - margin-bottom: 6px; - flex-direction: row; - /*width: 100%;*/ - /*height: 100%;*/ -} - -.node FloatField { - min-width: 40px; +/* *********** Base Node *********** */ +.node { + min-width: auto; } -.unity-text-element { - -unity-text-align: middle-center; +/* *********** Title Bar *********** */ +.node #title { + height:50px; } -.node #title-button-container { - visibility: hidden; - width:0; - height:0; +.node #title-container { + margin-bottom: 6px; } .node #title-icon { @@ -48,17 +27,28 @@ align-self: center; } -.node #state-border { - position: absolute; - right: 0; - left: 0; - top: 0; - bottom: 0; - border-color: green; - border-width: 2px; - border-radius: 8px; - opacity:0; - margin:1px; +.node #title-button-container { + visibility: hidden; + width:0; + height:0; +} + +/* *********** Property Container *********** */ +.node #contents { + display: none; +} + +.node #property-container { + flex-direction: column; +} + +/* *********** *********** */ +.node FloatField { + min-width: 40px; +} + +.unity-text-element { + -unity-text-align: middle-center; } Port { @@ -72,10 +62,3 @@ Port Label { display: none; } -.node #contents { - display: none; -} - -.node #property-container { - flex-direction: column; -} diff --git a/Editor/Resources/DelayNodeView.uss.meta b/Editor/Resources/Nodes/DelayNodeView.uss.meta similarity index 100% rename from Editor/Resources/DelayNodeView.uss.meta rename to Editor/Resources/Nodes/DelayNodeView.uss.meta diff --git a/Editor/Resources/Nodes/EntryNodeView.uss b/Editor/Resources/Nodes/EntryNodeView.uss new file mode 100644 index 0000000..d13f239 --- /dev/null +++ b/Editor/Resources/Nodes/EntryNodeView.uss @@ -0,0 +1,46 @@ +/* *********** EntryNodeView *********** */ +@import url("BaseNode.uss"); +@import url("TitleBar.uss"); + +.node { + min-width: auto; +} + +/* *********** Title Bar *********** */ +.node #title-label { + margin-left: 18px; + margin-right: 5px; +} + +.node #title-container { + padding-right: 0px; + margin-bottom: 6px; +} + +.node #title-button-container { + visibility: hidden; + width:0; + height:0; +} + +.node #title-icon { + min-width:24px; + min-height:24px; + width: 24px; + height:24px; + margin-right: -5px; +} + +/* *********** *********** */ +Port { + height: 100%; + width: 26px; +} + +Port Label { + display: none; +} + +.node #contents { + display: none; +} diff --git a/Editor/Resources/EntryNodeView.uss.meta b/Editor/Resources/Nodes/EntryNodeView.uss.meta similarity index 100% rename from Editor/Resources/EntryNodeView.uss.meta rename to Editor/Resources/Nodes/EntryNodeView.uss.meta diff --git a/Editor/Resources/Nodes/ExitNodeView.uss b/Editor/Resources/Nodes/ExitNodeView.uss new file mode 100644 index 0000000..c0434cd --- /dev/null +++ b/Editor/Resources/Nodes/ExitNodeView.uss @@ -0,0 +1,47 @@ +/* *********** ExitNodeView *********** */ +@import url("BaseNode.uss"); +@import url("TitleBar.uss"); + +.node { + min-width: auto; +} + +/* *********** Title Bar *********** */ +.node #title-label { + margin-left: 5px; + margin-right: 18px; +} + +.node #title-container { + padding-left: 0px; + margin-bottom: 6px; + flex-direction: row-reverse; +} + +.node #title-button-container { + visibility: hidden; + width:0; + height:0; +} + +.node #title-icon { + min-width:24px; + min-height:24px; + width: 24px; + height:24px; + margin-left: -5px; +} + +/* *********** *********** */ +Port { + height: 100%; + width: 26px; +} + +Port Label { + display: none; +} + +.node #contents { + display: none; +} diff --git a/Editor/Resources/ExitNodeView.uss.meta b/Editor/Resources/Nodes/ExitNodeView.uss.meta similarity index 100% rename from Editor/Resources/ExitNodeView.uss.meta rename to Editor/Resources/Nodes/ExitNodeView.uss.meta diff --git a/Editor/Resources/JumpNodeView.uss b/Editor/Resources/Nodes/JumpNodeView.uss similarity index 83% rename from Editor/Resources/JumpNodeView.uss rename to Editor/Resources/Nodes/JumpNodeView.uss index 319608b..a51af9f 100644 --- a/Editor/Resources/JumpNodeView.uss +++ b/Editor/Resources/Nodes/JumpNodeView.uss @@ -1,14 +1,16 @@ -.node #title { - flex-direction: row; +/* *********** JumpNodeView *********** */ +@import url("BaseNode.uss"); + +/* *********** Base Node *********** */ +.node { + min-width: auto; } +/* *********** Title Bar *********** */ .node #title-container { padding-right: 0px; - align-items: center; margin-top: 8px; margin-bottom: 8px; - flex-direction: row; - width: 100% } .node.jump-out #title-container { @@ -33,19 +35,7 @@ height:24px; } -.node #state-border { - position: absolute; - right: 0; - left: 0; - top: 0; - bottom: 0; - border-color: green; - border-width: 2px; - border-radius: 8px; - opacity:0; - margin:1px; -} - +/* *********** *********** */ Port { height: 100%; width: 26px; diff --git a/Editor/Resources/JumpNodeView.uss.meta b/Editor/Resources/Nodes/JumpNodeView.uss.meta similarity index 100% rename from Editor/Resources/JumpNodeView.uss.meta rename to Editor/Resources/Nodes/JumpNodeView.uss.meta diff --git a/Editor/Resources/Nodes/ProgressBar.uss b/Editor/Resources/Nodes/ProgressBar.uss new file mode 100644 index 0000000..62713f0 --- /dev/null +++ b/Editor/Resources/Nodes/ProgressBar.uss @@ -0,0 +1,31 @@ +/* ProgressBar.uss */ + +/* *********** Progress Bar *********** */ + +.node #progress-bar { + margin-left: 0px; + margin-right: 0px; + margin-bottom: 0px; + translate: 0px 2px; +} + +.node .unity-progress-bar__background { + background-color: #252525; +} + +.unity-progress-bar__progress { + visibility: hidden; +} + +.active-node .unity-progress-bar__progress { + visibility: visible; +} + +#progress-bar { + height: 6px; + margin:2px; +} + +.unity-progress-bar__progress { + background-color: #4CAF50; +} \ No newline at end of file diff --git a/Editor/Resources/Nodes/ProgressBar.uss.meta b/Editor/Resources/Nodes/ProgressBar.uss.meta new file mode 100644 index 0000000..59b54c9 --- /dev/null +++ b/Editor/Resources/Nodes/ProgressBar.uss.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 821e7a635c63443596a119f92f43f751 +timeCreated: 1726897718 \ No newline at end of file diff --git a/Editor/Resources/Nodes/PropertyContainer.uss b/Editor/Resources/Nodes/PropertyContainer.uss new file mode 100644 index 0000000..bd281f4 --- /dev/null +++ b/Editor/Resources/Nodes/PropertyContainer.uss @@ -0,0 +1,34 @@ +/* PropertyContainer.uss */ + +/* *********** Property Container *********** */ +#property-container { + background-color: #2E2E2E; + width: auto; + padding-bottom: 5px; + padding-top: 5px; + max-height: 200px; +} + +#property-container.has-properties { + width: auto; +} + +#property-container.has-properties #unity-content-viewport{ + padding-top:5px; + padding-bottom:5px; + padding-left:2px; + padding-right:2px; +} + +#property-container.relay { + width: 120px; +} + +#unity-content { + margin:5px; +} + +#field-container { + height: 20px; + flex-direction: row; +} \ No newline at end of file diff --git a/Editor/Resources/Nodes/PropertyContainer.uss.meta b/Editor/Resources/Nodes/PropertyContainer.uss.meta new file mode 100644 index 0000000..84ee165 --- /dev/null +++ b/Editor/Resources/Nodes/PropertyContainer.uss.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 84fe4621b0484b25b0784819de798c6a +timeCreated: 1727078902 \ No newline at end of file diff --git a/Editor/Resources/RelayNodeView.uss b/Editor/Resources/Nodes/RelayNodeView.uss similarity index 70% rename from Editor/Resources/RelayNodeView.uss rename to Editor/Resources/Nodes/RelayNodeView.uss index d357faf..3b91317 100644 --- a/Editor/Resources/RelayNodeView.uss +++ b/Editor/Resources/Nodes/RelayNodeView.uss @@ -1,23 +1,20 @@ -.node #title { - flex-direction: row; - height: 19px; -} - -.node Port { - height: 19px; - padding-top:0px; -} +/* *********** RelayNodeView *********** */ +@import url("BaseNode.uss"); +@import url("TitleBar.uss"); -.port.input { - background-color: #555555; +/* *********** Base Node *********** */ +.node { + min-width: auto; } -.port.output { - background-color: #777777; +/* *********** Title Bar *********** */ +.node #title { + height: 19px; } -.port.input #connector { - border-left-color: white; +.node #title-container { + padding-left: 0px; + padding-right: 0px; } .node #title-label { @@ -32,7 +29,6 @@ .node #title-container { margin-top: 0px; margin-bottom: 0px; - flex-direction: row; } .node #title-button-container { @@ -41,17 +37,22 @@ height:0; } -.node #state-border { - position: absolute; - right: 0; - left: 0; - top: 0; - bottom: 0; - border-color: green; - border-width: 2px; - border-radius: 8px; - opacity:0; - margin:1px; +/* *********** *********** */ +.node Port { + height: 19px; + padding-top:0px; +} + +.port.input { + background-color: #555555; +} + +.port.output { + background-color: #777777; +} + +.port.input #connector { + border-left-color: white; } Port { diff --git a/Editor/Resources/RelayNodeView.uss.meta b/Editor/Resources/Nodes/RelayNodeView.uss.meta similarity index 100% rename from Editor/Resources/RelayNodeView.uss.meta rename to Editor/Resources/Nodes/RelayNodeView.uss.meta diff --git a/Editor/Resources/Nodes/StateNodeView.uss b/Editor/Resources/Nodes/StateNodeView.uss new file mode 100644 index 0000000..c7af947 --- /dev/null +++ b/Editor/Resources/Nodes/StateNodeView.uss @@ -0,0 +1,15 @@ +/* *********** StateNodeView *********** */ +@import url("BaseNode.uss"); +@import url("ProgressBar.uss"); +@import url("PropertyContainer.uss"); +@import url("TitleBar.uss"); + +/* *********** Base Node *********** */ +/** No Overrides **/ + +/* *********** Title Bar *********** */ +.node #title { + flex-direction: column; +} + +/* *********** Property Container *********** */ diff --git a/Editor/Resources/StateNodeView.uss.meta b/Editor/Resources/Nodes/StateNodeView.uss.meta similarity index 100% rename from Editor/Resources/StateNodeView.uss.meta rename to Editor/Resources/Nodes/StateNodeView.uss.meta diff --git a/Editor/Resources/Nodes/StickyNoteNodeView.uss b/Editor/Resources/Nodes/StickyNoteNodeView.uss new file mode 100644 index 0000000..2a74b8a --- /dev/null +++ b/Editor/Resources/Nodes/StickyNoteNodeView.uss @@ -0,0 +1,31 @@ +/* *********** StickyNoteNodeView *********** */ +@import url("BaseNode.uss"); +@import url("ProgressBar.uss"); +@import url("PropertyContainer.uss"); +@import url("TitleBar.uss"); + +/* *********** Base Node *********** */ +.node #title { + flex-direction: column; +} + +/* *********** Property Container *********** */ +#property-container { + padding-bottom: 2px; + padding-top: 2px; + max-height: 100px; +} + +#property-container.has-properties #unity-content-viewport{ + padding-top:2px; + padding-bottom:2px; +} + +#unity-content { + margin:2px; +} + +#field-container { + height: 20px; + flex-direction: row; +} \ No newline at end of file diff --git a/Editor/Resources/StickyNoteNodeView.uss.meta b/Editor/Resources/Nodes/StickyNoteNodeView.uss.meta similarity index 100% rename from Editor/Resources/StickyNoteNodeView.uss.meta rename to Editor/Resources/Nodes/StickyNoteNodeView.uss.meta diff --git a/Editor/Resources/Nodes/SubStateNodeView.uss b/Editor/Resources/Nodes/SubStateNodeView.uss new file mode 100644 index 0000000..3d346b0 --- /dev/null +++ b/Editor/Resources/Nodes/SubStateNodeView.uss @@ -0,0 +1,31 @@ +/* *********** SubStateNodeView *********** */ +@import url("BaseNode.uss"); +@import url("ProgressBar.uss"); +@import url("PropertyContainer.uss"); +@import url("TitleBar.uss"); + +.node { + min-width: 340px; + max-width: 320px; +} + +.node #title { + flex-direction: column; +} + +.node #title-button-container { + visibility: hidden; + width:0; + height:0; +} + +.node #title-icon { + min-width:22px; + min-height:22px; + width: 22px; + height:22px; +} + +.unity-text-element { + min-width: 50px; +} \ No newline at end of file diff --git a/Editor/Resources/SubStateNodeView.uss.meta b/Editor/Resources/Nodes/SubStateNodeView.uss.meta similarity index 100% rename from Editor/Resources/SubStateNodeView.uss.meta rename to Editor/Resources/Nodes/SubStateNodeView.uss.meta diff --git a/Editor/Resources/Nodes/TitleBar.uss b/Editor/Resources/Nodes/TitleBar.uss new file mode 100644 index 0000000..b1ea67d --- /dev/null +++ b/Editor/Resources/Nodes/TitleBar.uss @@ -0,0 +1,51 @@ +/* TitleBar.uss */ + +/* *********** Title Bar *********** */ +.node #title { + height:36px; +} + +.node #title-label { + font-size: 14px; + margin-left: 10px; + margin-right: 10px; + flex-grow: 1; + -unity-text-align: middle-center; + -unity-font-style: Bold; +} + +.node #title-container { + padding-left: 10px; + padding-right: 10px; + align-items: center; + margin-top: 6px; + margin-bottom: 0px; + flex-direction: row; + width: 100% +} + +.node #title-button-container { + +} + +.node #title-icon { + min-width:22px; + min-height:22px; + width: 22px; + height:22px; +} + +#edit-btn { + background-color: #1d1d1d; + margin:0px; + height:100%; + width:30px; + border-radius: 5px; + align-items: center; + justify-content: center; +} + +#edit-btn-icon { + width: 80%; + height: auto; +} \ No newline at end of file diff --git a/Editor/Resources/Nodes/TitleBar.uss.meta b/Editor/Resources/Nodes/TitleBar.uss.meta new file mode 100644 index 0000000..9d1a056 --- /dev/null +++ b/Editor/Resources/Nodes/TitleBar.uss.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d923939bf9fc429092d43d6e9b098e08 +timeCreated: 1727079595 \ No newline at end of file diff --git a/Editor/Resources/StateNodeView.uss b/Editor/Resources/StateNodeView.uss deleted file mode 100644 index 839e34c..0000000 --- a/Editor/Resources/StateNodeView.uss +++ /dev/null @@ -1,131 +0,0 @@ -/* *********** Node *********** */ - -.node { - min-width: 280px; - max-width: 540px; -} - -.node #title { -flex-direction: column; -} - -.node #title-label { - font-size: 14px; - margin-left: 10px; - margin-right: 10px; - flex-grow: 1; - -unity-text-align: middle-center; - -unity-font-style: Bold; -} - -.node #title-container { - padding-left: 10px; - padding-right: 10px; - align-items: center; - margin-top: 6px; - margin-bottom: 0px; - flex-direction: row; - width: 100% -} - -.node #title-icon { - min-width:22px; - min-height:22px; - width: 22px; - height:22px; -} - -.node #state-border { - position: absolute; - right: 0; - left: 0; - top: 0; - bottom: 0; - border-color: #4CAF50; - border-width: 2px; - border-radius: 8px; - opacity:0; - margin:1px; -} - -/* *********** Progress Bar *********** */ - -.node #progress-bar { - margin-left: 0px; - margin-right: 0px; - margin-bottom: 0px; - translate: 0px 2px; -} - -.node .unity-progress-bar__background { - background-color: #252525; -} - -.unity-progress-bar__progress { - visibility: hidden; -} - -.active-node .unity-progress-bar__progress { - visibility: visible; -} - -#progress-bar { - height: 6px; - margin:2px; -} - -.unity-progress-bar__progress { - background-color: #4CAF50; -} - -/* *********** Property Container *********** */ -#property-container { - background-color: #2E2E2E; - width: auto; - padding-bottom: 5px; - padding-top: 5px; - max-height: 200px; -} - -#property-container.has-properties { - width: auto; -} - -#property-container.has-properties #unity-content-viewport{ - padding-top:5px; - padding-bottom:5px; - padding-left:2px; - padding-right:2px; -} - -#property-container.relay { - width: 120px; -} - -#unity-content { - margin:5px; -} - -#field-container { - height: 20px; - flex-direction: row; -} - -#edit-btn { - background-color: #1d1d1d; - margin:0px; - height:100%; - width:30px; - border-radius: 5px; - align-items: center; - justify-content: center; -} - -#edit-btn-icon { - width: 80%; - height: auto; -} - -/*.port.output.typed #type {*/ -/* color: greenyellow;*/ -/*}*/ \ No newline at end of file diff --git a/Editor/Resources/StickyNoteNodeView.uss b/Editor/Resources/StickyNoteNodeView.uss deleted file mode 100644 index 3e0b10e..0000000 --- a/Editor/Resources/StickyNoteNodeView.uss +++ /dev/null @@ -1,112 +0,0 @@ -/* *********** Node *********** */ - -.node { - min-width: 280px; - max-width: 340px; -} - -.node #title { - flex-direction: column; -} - -.node #title-label { - font-size: 14px; - margin-left: 10px; - margin-right: 10px; - flex-grow: 1; - -unity-text-align: middle-center; - -unity-font-style: Bold; -} - -.node #title-container { - padding-left: 10px; - padding-right: 10px; - align-items: center; - margin-top: 6px; - margin-bottom: 0px; - flex-direction: row; - width: 100% -} - -.node #title-icon { - min-width:22px; - min-height:22px; - width: 22px; - height:22px; -} - -.node #state-border { - position: absolute; - right: 0; - left: 0; - top: 0; - bottom: 0; - border-color: #4CAF50; - border-width: 2px; - border-radius: 8px; - opacity:0; - margin:1px; -} - -/* *********** Progress Bar *********** */ - -.node #progress-bar { - margin-left: 0px; - margin-right: 0px; - margin-bottom: 0px; - translate: 0px 2px; -} - -.node .unity-progress-bar__background { - background-color: #252525; -} - -.unity-progress-bar__progress { - visibility: hidden; -} - -.active-node .unity-progress-bar__progress { - visibility: visible; -} - -#progress-bar { - height: 6px; - margin:2px; -} - -.unity-progress-bar__progress { - background-color: #4CAF50; -} - -/* *********** Property Container *********** */ -#property-container { - background-color: #2E2E2E; - width: auto; - padding-bottom: 2px; - padding-top: 2px; - max-height: 100px; -} - -#property-container.has-properties { - width: auto; -} - -#property-container.has-properties #unity-content-viewport{ - padding-top:2px; - padding-bottom:2px; - padding-left:2px; - padding-right:2px; -} - -#property-container.relay { - width: 120px; -} - -#unity-content { - margin:2px; -} - -#field-container { - height: 20px; - flex-direction: row; -} \ No newline at end of file diff --git a/Editor/Resources/SubStateNodeView.uss b/Editor/Resources/SubStateNodeView.uss deleted file mode 100644 index 5ff0bc1..0000000 --- a/Editor/Resources/SubStateNodeView.uss +++ /dev/null @@ -1,126 +0,0 @@ -/* *********** Node *********** */ - -.node { - min-width: 340px; - max-width: 320px; -} - -.node #title { -flex-direction: column; -} - -.node #title-label { - font-size: 14px; - margin-left: 10px; - margin-right: 10px; - flex-grow: 1; - -unity-text-align: middle-center; - -unity-font-style: Bold; -} - -.node #title-container { - padding-left: 10px; - padding-right: 10px; - align-items: center; - margin-top: 6px; - margin-bottom: 0px; - flex-direction: row; - width: 100% -} - -.node #title-button-container { - visibility: hidden; - width:0; - height:0; -} - -node #title-button { - -} - -.node #title-icon { - min-width:22px; - min-height:22px; - width: 22px; - height:22px; -} - -.node #state-border { - position: absolute; - right: 0; - left: 0; - top: 0; - bottom: 0; - border-color: green; - border-width: 2px; - border-radius: 8px; - opacity:0; - margin:1px; -} - -/* *********** Progress Bar *********** */ - -.node #progress-bar { - margin-left: 0px; - margin-right: 0px; - margin-bottom: 0px; - translate: 0px 2px; -} - -.node .unity-progress-bar__background { - background-color: #252525; -} - -.unity-progress-bar__progress { - visibility: hidden; -} - -.active-node .unity-progress-bar__progress { - visibility: visible; -} - -#progress-bar { - height: 6px; - margin:2px; -} - -.unity-progress-bar__progress { - background-color: #4CAF50; -} - -/* *********** Property Container *********** */ -#property-container { - background-color: #2E2E2E; - width: auto; - padding-bottom: 5px; - padding-top: 5px; - max-height: 200px; -} - -#property-container.has-properties { - width: auto; -} - -#property-container.has-properties #unity-content-viewport{ - padding-top:5px; - padding-bottom:5px; - padding-left:2px; - padding-right:2px; -} - -#property-container.relay { - width: 120px; -} - -#unity-content { - margin:5px; -} - -#field-container { - height: 20px; - flex-direction: row; -} - -.unity-text-element { - min-width: 50px; -} \ No newline at end of file diff --git a/Editor/Resources/UnityDefaultRuntimeTheme.tss b/Editor/Resources/UnityDefaultRuntimeTheme.tss new file mode 100644 index 0000000..79453c7 --- /dev/null +++ b/Editor/Resources/UnityDefaultRuntimeTheme.tss @@ -0,0 +1,2 @@ +@import url("unity-theme://default"); +VisualElement {} \ No newline at end of file diff --git a/Editor/Resources/UnityDefaultRuntimeTheme.tss.meta b/Editor/Resources/UnityDefaultRuntimeTheme.tss.meta new file mode 100644 index 0000000..d623930 --- /dev/null +++ b/Editor/Resources/UnityDefaultRuntimeTheme.tss.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 469d2edcd047e2b40bd4f6940fba6fa3 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12388, guid: 0000000000000000e000000000000000, type: 0} + disableValidation: 0 diff --git a/Editor/StateGraph/Nodes/BaseStateNodeView.cs b/Editor/StateGraph/Nodes/BaseStateNodeView.cs index 27c0779..3237123 100644 --- a/Editor/StateGraph/Nodes/BaseStateNodeView.cs +++ b/Editor/StateGraph/Nodes/BaseStateNodeView.cs @@ -224,8 +224,9 @@ protected static VisualElement CreateCustomSubStateMachineUI(SerializedProperty protected virtual void AddStyle(string stylePath) { - var styleSheet = Resources.Load(stylePath); - Assert.IsNotNull(styleSheet, $"{stylePath}.uss not found"); + var path = Path.Combine("Nodes", stylePath); + var styleSheet = Resources.Load(path); + Assert.IsNotNull(styleSheet, $"{path}.uss not found"); styleSheets.Add(styleSheet); } diff --git a/Editor/StateGraph/Nodes/NodeComponents.meta b/Editor/StateGraph/Nodes/NodeComponents.meta new file mode 100644 index 0000000..887122e --- /dev/null +++ b/Editor/StateGraph/Nodes/NodeComponents.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 005677df5fdc44d58e59ab65f922f40a +timeCreated: 1726892871 \ No newline at end of file diff --git a/Editor/StateGraph/Nodes/NodeComponents/INodeComponent.cs b/Editor/StateGraph/Nodes/NodeComponents/INodeComponent.cs new file mode 100644 index 0000000..4389bc9 --- /dev/null +++ b/Editor/StateGraph/Nodes/NodeComponents/INodeComponent.cs @@ -0,0 +1,9 @@ +using UnityEditor.Experimental.GraphView; + +namespace Nonatomic.VSM2.Editor.StateGraph.Nodes.NodeComponents +{ + public interface INodeComponent + { + void Initialize(BaseStateNodeView node); + } +} \ No newline at end of file diff --git a/Editor/StateGraph/Nodes/NodeComponents/INodeComponent.cs.meta b/Editor/StateGraph/Nodes/NodeComponents/INodeComponent.cs.meta new file mode 100644 index 0000000..18963d9 --- /dev/null +++ b/Editor/StateGraph/Nodes/NodeComponents/INodeComponent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8d915aeeb2e24143ab722efd6e71b26a +timeCreated: 1726892896 \ No newline at end of file diff --git a/Editor/StateGraph/Nodes/NodeComponents/NodeStylingComponent.cs b/Editor/StateGraph/Nodes/NodeComponents/NodeStylingComponent.cs new file mode 100644 index 0000000..77f4e24 --- /dev/null +++ b/Editor/StateGraph/Nodes/NodeComponents/NodeStylingComponent.cs @@ -0,0 +1,16 @@ +using UnityEditor.Experimental.GraphView; +using UnityEngine; +using UnityEngine.UIElements; + +namespace Nonatomic.VSM2.Editor.StateGraph.Nodes.NodeComponents +{ + public class NodeStylingComponent : INodeComponent + { + public void Initialize(BaseStateNodeView node) + { + // var styleSheet = Resources.Load(stylePath); + // Assert.IsNotNull(styleSheet, $"{stylePath}.uss not found"); + // styleSheets.Add(styleSheet); + } + } +} \ No newline at end of file diff --git a/Editor/StateGraph/Nodes/NodeComponents/NodeStylingComponent.cs.meta b/Editor/StateGraph/Nodes/NodeComponents/NodeStylingComponent.cs.meta new file mode 100644 index 0000000..e5a6fe0 --- /dev/null +++ b/Editor/StateGraph/Nodes/NodeComponents/NodeStylingComponent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5741a8d869594dedbc22552915839808 +timeCreated: 1726892922 \ No newline at end of file diff --git a/Runtime/Data/SharedData.cs b/Runtime/Data/SharedData.cs index 67af9c0..f5964dc 100644 --- a/Runtime/Data/SharedData.cs +++ b/Runtime/Data/SharedData.cs @@ -17,9 +17,6 @@ public interface ISharedData void RemoveData(string key); void ClearAllData(); IEnumerable GetKeys(); - - [Obsolete("Use ClearAllData() instead. This method will be removed in a future version.")] - void ClearData(); } public class SharedData : ISharedData @@ -131,13 +128,7 @@ public void ClearAllData() _lock.ExitWriteLock(); } } - - [Obsolete("Use ClearAllData() instead. This method will be removed in a future version.")] - public void ClearData() - { - ClearAllData(); - } - + public IEnumerable GetKeys() { _lock.EnterReadLock(); diff --git a/Runtime/StateGraph/StateMachine.cs b/Runtime/StateGraph/StateMachine.cs index c33a901..f0e4f49 100644 --- a/Runtime/StateGraph/StateMachine.cs +++ b/Runtime/StateGraph/StateMachine.cs @@ -117,6 +117,7 @@ public void OnDestroy() node?.OnDestroy(); } + SharedData.ClearAllData(); Model = null; } diff --git a/Runtime/StateGraph/States/CounterWithTargetState.cs b/Runtime/StateGraph/States/CounterWithTargetState.cs index ede3383..4f4a5e1 100644 --- a/Runtime/StateGraph/States/CounterWithTargetState.cs +++ b/Runtime/StateGraph/States/CounterWithTargetState.cs @@ -10,10 +10,11 @@ namespace Nonatomic.VSM2.StateGraph.States * it's important to flag that the Count value should not be * serialized, although we reset the value on awake any way. */ - [NodeWidth(width:250), NodeColor(NodeColor.Dijon), NodeIcon(NodeIcon.PlusCircle)] + [NodeColor(NodeColor.Dijon), NodeIcon(NodeIcon.PlusCircle)] public class CounterWithTargetState : BaseCounterState { [Transition(frameDelay:0)] public event Action OnContinue; + [Transition(frameDelay:0)] public event Action OnContinueWithCount; [Transition(frameDelay:0)] public event Action OnTargetReached; [SerializeField] private int _target = 2; @@ -21,12 +22,25 @@ public class CounterWithTargetState : BaseCounterState [Enter] public override void OnEnterState() + { + Enter(); + } + + [Enter("Enter with target")] + public void OnEnterStateWithTarget(int target) + { + _target = target; + Enter(); + } + + private void Enter() { IncrementCounter(); if (Count < _target) { OnContinue?.Invoke(); + OnContinueWithCount?.Invoke(Count); } else { From 88895c2c3c1be1d1d8ebd3df5296ca599221fa49 Mon Sep 17 00:00:00 2001 From: Paul Stamp Date: Mon, 23 Sep 2024 19:54:33 +0100 Subject: [PATCH 2/2] uss is now simplified --- Editor/Resources/Nodes/CounterNodeView.uss | 5 +---- Editor/Resources/Nodes/DelayNodeView.uss | 3 +++ Editor/StateGraph/Nodes/BaseStateNodeView.cs | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Editor/Resources/Nodes/CounterNodeView.uss b/Editor/Resources/Nodes/CounterNodeView.uss index 1d6bfb2..4d89db0 100644 --- a/Editor/Resources/Nodes/CounterNodeView.uss +++ b/Editor/Resources/Nodes/CounterNodeView.uss @@ -42,10 +42,7 @@ .node #property-container { flex-direction: column; -} - -#property-container { - background-color: red; + background-color: rgba(0, 0, 0, 0); } /* *********** *********** */ diff --git a/Editor/Resources/Nodes/DelayNodeView.uss b/Editor/Resources/Nodes/DelayNodeView.uss index 0488f1b..c4f4ecc 100644 --- a/Editor/Resources/Nodes/DelayNodeView.uss +++ b/Editor/Resources/Nodes/DelayNodeView.uss @@ -1,6 +1,8 @@ /* *********** DelayNodeView *********** */ @import url("BaseNode.uss"); +@import url("ProgressBar.uss"); @import url("TitleBar.uss"); +@import url("PropertyContainer.uss"); /* *********** Base Node *********** */ .node { @@ -40,6 +42,7 @@ .node #property-container { flex-direction: column; + background-color: rgba(0, 0, 0, 0); } /* *********** *********** */ diff --git a/Editor/StateGraph/Nodes/BaseStateNodeView.cs b/Editor/StateGraph/Nodes/BaseStateNodeView.cs index 3237123..2b71274 100644 --- a/Editor/StateGraph/Nodes/BaseStateNodeView.cs +++ b/Editor/StateGraph/Nodes/BaseStateNodeView.cs @@ -6,6 +6,7 @@ using Nonatomic.VSM2.Editor.NodeGraph; using Nonatomic.VSM2.Editor.Services; using Nonatomic.VSM2.Editor.Utils; +using Nonatomic.VSM2.Logging; using Nonatomic.VSM2.NodeGraph; using Nonatomic.VSM2.StateGraph; using Nonatomic.VSM2.StateGraph.Attributes; @@ -189,7 +190,7 @@ protected virtual VisualElement MakePropertyInspector(UnityEngine.Object target, var serializedProperty = serializedObject.FindProperty(field.Name); if (serializedProperty == null) { - Debug.LogWarning($"Property {field.Name} not found in serialized object."); + GraphLog.LogWarning($"Property {field.Name} not found in serialized object."); continue; }