diff --git a/Editor/NodeGraphEditor.cs b/Editor/NodeGraphEditor.cs index 60b0cdb..5a5c983 100644 --- a/Editor/NodeGraphEditor.cs +++ b/Editor/NodeGraphEditor.cs @@ -41,12 +41,10 @@ namespace XNodeEditor { /// Returns context node menu path. Null or empty strings for hidden nodes. public virtual string GetNodeMenuName(Type type) { - //Check if type has the CreateNodeMenuAttribute XNode.Node.CreateNodeMenuAttribute attrib; - if (NodeEditorUtilities.GetAttrib(type, out attrib)) // Return custom path - return attrib.menuName; - else // Return generated path - return NodeEditorUtilities.NodeDefaultPath(type); + string name = NodeEditorUtilities.GetAttrib(type, out attrib) ? attrib.menuName : NodeEditorUtilities.NodeDefaultPath(type); + name = name.Replace("X Node/", ""); + return name; } /// The order by which the menu items are displayed. @@ -184,7 +182,7 @@ namespace XNodeEditor { /// The returned color is used to color the background of the door. /// Usually used for outer edge effect public virtual Color GetPortBackgroundColor(XNode.NodePort port) { - return Color.gray; + return Color.white; } /// Returns generated color for a type. This color is editable in preferences diff --git a/Runtime/Flow/Events.meta b/Runtime/Flow/Events.meta new file mode 100644 index 0000000..489aed8 --- /dev/null +++ b/Runtime/Flow/Events.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 2d9f2360b3c44077a4e627c1e1c632c7 +timeCreated: 1673300700 \ No newline at end of file diff --git a/Runtime/Flow/Events/StartNode.cs b/Runtime/Flow/Events/StartNode.cs new file mode 100644 index 0000000..9d63bc3 --- /dev/null +++ b/Runtime/Flow/Events/StartNode.cs @@ -0,0 +1,8 @@ +namespace XNode.Flow.Events +{ + [NodeTint(1.0F,0.25F,0.25F), NodeWidth(75)] + public class StartNode : OutFlowNode + { + + } +} \ No newline at end of file diff --git a/Runtime/Flow/Events/StartNode.cs.meta b/Runtime/Flow/Events/StartNode.cs.meta new file mode 100644 index 0000000..3873d51 --- /dev/null +++ b/Runtime/Flow/Events/StartNode.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e65f760a3b214683992e83787395aca5 +timeCreated: 1673300714 \ No newline at end of file diff --git a/Runtime/Flow/FlowNode.cs b/Runtime/Flow/FlowNode.cs index d21b758..2584a2f 100644 --- a/Runtime/Flow/FlowNode.cs +++ b/Runtime/Flow/FlowNode.cs @@ -5,6 +5,7 @@ using UnityEngine; namespace XNode.Flow { + [Serializable] public abstract class FlowNode : Node { public override object GetValue(NodePort port) @@ -24,6 +25,7 @@ namespace XNode.Flow public FlowNode GetFlowNode(string portName) => GetValue(GetPort(portName)) as FlowNode; } + [Serializable] public abstract class InFlowNode : FlowNode { [Input(ShowBackingValue.Never, ConnectionType.Multiple, TypeConstraint.Inherited)] @@ -36,6 +38,7 @@ namespace XNode.Flow } } + [Serializable] public abstract class OutFlowNode : FlowNode { [Output(ShowBackingValue.Never, ConnectionType.Multiple, TypeConstraint.Inherited)] @@ -48,6 +51,7 @@ namespace XNode.Flow } } + [Serializable] public abstract class InOutFlowNode : FlowNode { [Input(ShowBackingValue.Never, ConnectionType.Multiple, TypeConstraint.Inherited)]