Class AnimationGraph.CustomNode
Base class for all custom nodes. Allows to override it and define own Anim Graph nodes in game scripts or via plugins.
Inheritance
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
public abstract class CustomNode : Object
Remarks
See official documentation to learn more how to use and create custom nodes in Anim Graph.
Constructors
CustomNode()
Declaration
protected CustomNode()
Methods
CopyImpulseData(AnimationGraph.CustomNode.Impulse*, AnimationGraph.CustomNode.Impulse*)
Copies the impulse data from the source to the destination container.
Declaration
public static void CopyImpulseData(AnimationGraph.CustomNode.Impulse*source, AnimationGraph.CustomNode.Impulse*destination)
Parameters
AnimationGraph.CustomNode.Impulse*
source
The source data. |
AnimationGraph.CustomNode.Impulse*
destination
The destination data. |
Evaluate(ref AnimationGraph.CustomNode.Context)
Evaluates the node based on inputs and node data.
Declaration
public abstract object Evaluate(ref AnimationGraph.CustomNode.Context context)
Parameters
AnimationGraph.CustomNode.Context
context
The evaluation context. |
Returns
System.Object
The node value for the given context (node values, output box id, etc.). |
GetInputValue(ref AnimationGraph.CustomNode.Context, Int32)
Gets the value of the input box of the given ID. Throws the exception if box has no valid connection.
Declaration
public static object GetInputValue(ref AnimationGraph.CustomNode.Context context, int boxId)
Parameters
AnimationGraph.CustomNode.Context
context
The context. |
System.Int32
boxId
The input box identifier. |
Returns
System.Object
The value. |
GetOutputImpulseData(ref AnimationGraph.CustomNode.Context)
Gets the data for the output skeleton nodes hierarchy. Each node can have only one cached nodes output. Use this method if your node performs skeleton nodes modifications.
Declaration
public static AnimationGraph.CustomNode.Impulse*GetOutputImpulseData(ref AnimationGraph.CustomNode.Context context)
Parameters
AnimationGraph.CustomNode.Context
context
The context. |
Returns
AnimationGraph.CustomNode.Impulse*
The impulse data. It contains empty nodes hierarchy allocated per-node. Modify it to adjust output custom skeleton nodes transformations. |
HasConnection(ref AnimationGraph.CustomNode.Context, Int32)
Checks if th box of the given ID has valid connection to get its value.
Declaration
public static bool HasConnection(ref AnimationGraph.CustomNode.Context context, int boxId)
Parameters
AnimationGraph.CustomNode.Context
context
The context. |
System.Int32
boxId
The input box identifier. |
Returns
System.Boolean
True if has connection, otherwise false. |
Load(ref AnimationGraph.CustomNode.InitData)
Loads the node data from the serialized values and prepares the node to run. In most cases this method is called from the content loading thread (not the main game thread).
Declaration
public abstract void Load(ref AnimationGraph.CustomNode.InitData initData)
Parameters
AnimationGraph.CustomNode.InitData
initData
|