Class NodeCategoryAttribute
Class NodeCategoryAttribute. Implements the Attribute
Namespace: Mechatronics.SystemGraph
Syntax
[AttributeUsage(AttributeTargets.Class)]
public class NodeCategoryAttribute : Attribute, _Attribute
Constructors
NodeCategoryAttribute(String, String, NodeTick, LifeCycle, Single, NodeMode, Boolean)
Initializes a Node to be created in the graph.
Declaration
public NodeCategoryAttribute(string category, string name, NodeTick nodeTick = NodeTick.Synchronous, LifeCycle lifeCycleMask = (LifeCycle)0, float frequencyHint = 0F, NodeMode mode = NodeMode.Standard, bool expandable = false)
Parameters
| Type | Name | Description |
|---|---|---|
| String | category | Node category |
| String | name | Node name |
| NodeTick | nodeTick | Node scheduling behaviour. |
| LifeCycle | lifeCycleMask | Node unity event handling description. |
| Single | frequencyHint | Default node frequency. |
| NodeMode | mode | Node functionality |
| Boolean | expandable | Whether the node is expandable. |
NodeCategoryAttribute(Type)
Initializes the attribute using a linked type.
Declaration
public NodeCategoryAttribute(Type deferredType)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | deferredType | Linked type to initialize using, must have NodeCategoryAttribute. |
Fields
Category
Category field for the node, used for node creation menu.
Declaration
public string Category
Field Value
| Type | Description |
|---|---|
| String |
DeferredAttribute
If this attribute links to a different node type, which contains a NodeCategory attribute. This field will then contain the linked node type.
Declaration
public Type DeferredAttribute
Field Value
| Type | Description |
|---|---|
| Type |
Expandable
Describes if the node contains expandable ports.
Declaration
public bool Expandable
Field Value
| Type | Description |
|---|---|
| Boolean |
FrequencyHint
Give a default frequency for this node.
Declaration
public double FrequencyHint
Field Value
| Type | Description |
|---|---|
| Double |
kReservedChars
Characters to that are reserved for internal use, cannot be in node names.
Declaration
public readonly string[] kReservedChars
Field Value
| Type | Description |
|---|---|
| String[] |
LifeCycle
Describes which Unity events this node will handle.
Declaration
public LifeCycle LifeCycle
Field Value
| Type | Description |
|---|---|
| LifeCycle |
Mode
Describes the functionality of the node, see NodeMode.
Declaration
public NodeMode Mode
Field Value
| Type | Description |
|---|---|
| NodeMode |
Name
Default name of the node that appears in the editor, can be renamed from the editor later on.
Declaration
public string Name
Field Value
| Type | Description |
|---|---|
| String |
NodeTick
Describes how the node behaves with the scheduler.
Declaration
public NodeTick NodeTick
Field Value
| Type | Description |
|---|---|
| NodeTick |