Added defualt graph properties inspector;

Added sticky note;

Changed the name of BaseNode to SlotContainerNode in case we need other type of nodes in the future;
This commit is contained in:
Misaki
2024-11-04 01:02:30 +09:00
parent 5a9d8b9420
commit 7eec130b39
53 changed files with 517 additions and 436 deletions

View File

@@ -3,7 +3,7 @@ using UnityEngine;
namespace Misaki.GraphView
{
public class PropertyInputNode : BaseNode
public class PropertyInputNode : SlotContainerNode
{
[SerializeReference]
private ExposedProperty _property;

View File

@@ -5,7 +5,7 @@ using UnityEngine;
namespace Misaki.GraphView
{
[Serializable]
public abstract class BaseNode : SlotContainer
public abstract class SlotContainerNode : SlotContainer
{
[SerializeField]
private GraphObject _graphObject;
@@ -20,16 +20,21 @@ namespace Misaki.GraphView
public string Id => _id;
public Action OnExecutionCompleted;
public Action<BaseNode> OnExecutionFailed;
public Action<SlotContainerNode> OnExecutionFailed;
public Action OnExecuteFlagCleared;
/// <summary>
/// Initialize the node with the graph object, this method is called when the node is added to the graph.
/// </summary>
public virtual void Initialize(GraphObject graph)
public void Initialize(GraphObject graph)
{
_graphObject = graph;
InitializeSlot();
}
public virtual void InitializeSlot()
{
var type = GetType();
var fields = type.GetFields(ConstResource.NODE_FIELD_BINDING_FLAGS);