Added IExecutable and ISlotContainer interface.
Changed SlotContainerNode to ExecutableNode
This commit is contained in:
28
Runtime/Models/Nodes/PropertyInput.cs
Normal file
28
Runtime/Models/Nodes/PropertyInput.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Misaki.GraphView
|
||||
{
|
||||
public class PropertyInput : ExecutableNode
|
||||
{
|
||||
[SerializeReference]
|
||||
private ExposedProperty _property;
|
||||
|
||||
public ExposedProperty Property => _property;
|
||||
|
||||
[NodeOutput]
|
||||
public object value;
|
||||
|
||||
public PropertyInput(ExposedProperty property)
|
||||
{
|
||||
_property = property;
|
||||
}
|
||||
|
||||
protected override bool OnExecute()
|
||||
{
|
||||
value = _property.Value;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user