Show / Hide Table of Contents

Class BaseNode

Inheritance
System.Object
BaseNode
ParameterNode
Namespace: GraphProcessor
Assembly: com.alelievr.NodeGraphProcessor.Runtime.dll
Syntax
[Serializable]
public abstract class BaseNode

Constructors

| Improve this Doc View Source

BaseNode()

Declaration
protected BaseNode()

Fields

| Improve this Doc View Source

canProcess

Declaration
public bool canProcess
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

computeOrder

Declaration
public int computeOrder
Field Value
Type Description
System.Int32
| Improve this Doc View Source

debug

Is debug visible

Declaration
public bool debug
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

expanded

Is the node expanded

Declaration
public bool expanded
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

graph

Declaration
[NonSerialized]
protected BaseGraph graph
Field Value
Type Description
BaseGraph
| Improve this Doc View Source

GUID

Declaration
public string GUID
Field Value
Type Description
System.String
| Improve this Doc View Source

inputPorts

Container of input ports

Declaration
[NonSerialized]
public readonly NodeInputPortContainer inputPorts
Field Value
Type Description
NodeInputPortContainer
| Improve this Doc View Source

nodeLock

Node locked state

Declaration
public bool nodeLock
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

outputPorts

Container of output ports

Declaration
[NonSerialized]
public readonly NodeOutputPortContainer outputPorts
Field Value
Type Description
NodeOutputPortContainer
| Improve this Doc View Source

position

Declaration
public Rect position
Field Value
Type Description
UnityEngine.Rect

Properties

| Improve this Doc View Source

isLocked

Is the node is locked (if locked it can't be moved)

Declaration
public virtual bool isLocked { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

layoutStyle

Set a custom uss file for the node. We use a Resources.Load to get the stylesheet so be sure to put the correct resources path https://docs.unity3d.com/ScriptReference/Resources.Load.html

Declaration
public virtual string layoutStyle { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

name

Name of the node, it will be displayed in the title section

Declaration
public virtual string name { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

unlockable

If the node can be locked or not

Declaration
public virtual bool unlockable { get; }
Property Value
Type Description
System.Boolean

Methods

| Improve this Doc View Source

AddMessage(String, NodeMessageType)

Add a message on the node

Declaration
public void AddMessage(string message, NodeMessageType messageType)
Parameters
Type Name Description
System.String message
NodeMessageType messageType
| Improve this Doc View Source

AddPort(Boolean, String, PortData)

Add a port

Declaration
public void AddPort(bool input, string fieldName, PortData portData)
Parameters
Type Name Description
System.Boolean input

is input port

System.String fieldName

C# field name

PortData portData

Data of the port

| Improve this Doc View Source

ClearMessages()

Remove all messages on the node

Declaration
public void ClearMessages()
| Improve this Doc View Source

CreateFromType(Type, Vector2)

Creates a node of type nodeType at a certain position

Declaration
public static BaseNode CreateFromType(Type nodeType, Vector2 position)
Parameters
Type Name Description
System.Type nodeType
UnityEngine.Vector2 position

position in the graph in pixels

Returns
Type Description
BaseNode

the node instance

| Improve this Doc View Source

CreateFromType<T>(Vector2)

Creates a node of type T at a certain position

Declaration
public static T CreateFromType<T>(Vector2 position)
    where T : BaseNode
Parameters
Type Name Description
UnityEngine.Vector2 position

position in the graph in pixels

Returns
Type Description
T

the node instance

Type Parameters
Name Description
T

type of the node

| Improve this Doc View Source

Disable()

Called when the node is disabled

Declaration
protected virtual void Disable()
| Improve this Doc View Source

Enable()

Called when the node is enabled

Declaration
protected virtual void Enable()
| Improve this Doc View Source

Finalize()

Declaration
protected void Finalize()
| Improve this Doc View Source

GetInputNodes()

Get all the nodes connected to the input ports of this node

Declaration
public IEnumerable<BaseNode> GetInputNodes()
Returns
Type Description
System.Collections.Generic.IEnumerable<BaseNode>

an enumerable of node

| Improve this Doc View Source

GetNodeFields()

Declaration
public virtual FieldInfo[] GetNodeFields()
Returns
Type Description
System.Reflection.FieldInfo[]
| Improve this Doc View Source

GetOutputNodes()

Get all the nodes connected to the output ports of this node

Declaration
public IEnumerable<BaseNode> GetOutputNodes()
Returns
Type Description
System.Collections.Generic.IEnumerable<BaseNode>

an enumerable of node

| Improve this Doc View Source

GetPort(String, String)

Get the port from field name and identifier

Declaration
public NodePort GetPort(string fieldName, string identifier)
Parameters
Type Name Description
System.String fieldName

C# field name

System.String identifier

Unique port identifier

Returns
Type Description
NodePort
| Improve this Doc View Source

Initialize(BaseGraph)

Declaration
public void Initialize(BaseGraph graph)
Parameters
Type Name Description
BaseGraph graph
| Improve this Doc View Source

IsFieldInput(String)

Is the port an input

Declaration
public bool IsFieldInput(string fieldName)
Parameters
Type Name Description
System.String fieldName
Returns
Type Description
System.Boolean
| Improve this Doc View Source

OnEdgeConnected(SerializableEdge)

Declaration
public void OnEdgeConnected(SerializableEdge edge)
Parameters
Type Name Description
SerializableEdge edge
| Improve this Doc View Source

OnEdgeDisconnected(SerializableEdge)

Declaration
public void OnEdgeDisconnected(SerializableEdge edge)
Parameters
Type Name Description
SerializableEdge edge
| Improve this Doc View Source

OnNodeCreated()

Called only when the node is created, not when instantiated

Declaration
public virtual void OnNodeCreated()
| Improve this Doc View Source

OnProcess()

Declaration
public void OnProcess()
| Improve this Doc View Source

Process()

Override this method to implement custom processing

Declaration
protected virtual void Process()
| Improve this Doc View Source

RemoveMessage(String)

Remove a message on the node

Declaration
public void RemoveMessage(string message)
Parameters
Type Name Description
System.String message
| Improve this Doc View Source

RemoveMessageContains(String)

Remove a message that contains

Declaration
public void RemoveMessageContains(string subMessage)
Parameters
Type Name Description
System.String subMessage
| Improve this Doc View Source

RemovePort(Boolean, NodePort)

Remove a port

Declaration
public void RemovePort(bool input, NodePort port)
Parameters
Type Name Description
System.Boolean input

is input port

NodePort port

the port to delete

| Improve this Doc View Source

RemovePort(Boolean, String)

Remove port(s) from field name

Declaration
public void RemovePort(bool input, string fieldName)
Parameters
Type Name Description
System.Boolean input

is input

System.String fieldName

C# field name

| Improve this Doc View Source

UpdateAllPorts()

Update all ports of the node

Declaration
public void UpdateAllPorts()
| Improve this Doc View Source

UpdatePortsForField(String)

Update the ports related to one C# property field

Declaration
public void UpdatePortsForField(string fieldName)
Parameters
Type Name Description
System.String fieldName

Events

| Improve this Doc View Source

onAfterEdgeConnected

Triggered after an edge was connected on the node

Declaration
public event Action<SerializableEdge> onAfterEdgeConnected
Event Type
Type Description
System.Action<SerializableEdge>
| Improve this Doc View Source

onAfterEdgeDisconnected

Triggered after an edge was disconnected on the node

Declaration
public event Action<SerializableEdge> onAfterEdgeDisconnected
Event Type
Type Description
System.Action<SerializableEdge>
| Improve this Doc View Source

onMessageAdded

Declaration
public event Action<string, NodeMessageType> onMessageAdded
Event Type
Type Description
System.Action<System.String, NodeMessageType>
| Improve this Doc View Source

onMessageRemoved

Declaration
public event Action<string> onMessageRemoved
Event Type
Type Description
System.Action<System.String>
| Improve this Doc View Source

onProcessed

Triggered when the node is processes

Declaration
public event BaseNode.ProcessDelegate onProcessed
Event Type
Type Description
BaseNode.ProcessDelegate
  • Improve this Doc
  • View Source
Back to top Generated by DocFX