Class ConstantNodeView
This is the base class for all constant node views.
Inheritance
System.Object
ConstantNodeView
Inherited Members
Namespace: InsaneScatterbrain.ScriptGraph.Editor
Syntax
public abstract class ConstantNodeView : ScriptNodeView
Constructors
ConstantNodeView(ConstantNode, ScriptGraphView)
Declaration
public ConstantNodeView(ConstantNode node, ScriptGraphView graphView)
Parameters
Type | Name | Description |
---|---|---|
ConstantNode | node | |
ScriptGraphView | graphView |
Properties
ConstantNode
Gets the constant node associated with this node view.
Declaration
public ConstantNode ConstantNode { get; }
Property Value
Type | Description |
---|---|
ConstantNode |
Methods
AddDefaultField<TValue, TField>(TValue)
Adds a default field to assign the constant value with.
Declaration
protected TField AddDefaultField<TValue, TField>(TValue value)
where TField : VisualElement, INotifyValueChanged<TValue>, new()
Parameters
Type | Name | Description |
---|---|---|
TValue | value | The value. |
Returns
Type | Description |
---|---|
TField | The field. |
Type Parameters
Name | Description |
---|---|
TValue | The value's type. |
TField | The type of field to assign the value to. |
AddDefaultObjectField<TValue>(TValue)
Adds a default object field to assign the constant value with. This is useful for any type that inherits from Unity's Object class.
Declaration
protected ObjectField AddDefaultObjectField<TValue>(TValue value)
where TValue : Object
Parameters
Type | Name | Description |
---|---|---|
TValue | value | The value. |
Returns
Type | Description |
---|---|
ObjectField | The object field. |
Type Parameters
Name | Description |
---|---|
TValue | The value type. |