![]() |
ezEngine Release 26.3
|
#include <AnimGraph.h>
Public Member Functions | |
| void | Clear () |
| ezAnimGraphNode * | AddNode (ezUniquePtr< ezAnimGraphNode > &&pNode) |
| void | AddConnection (const ezAnimGraphNode *pSrcNode, ezStringView sSrcPinName, ezAnimGraphNode *pDstNode, ezStringView sDstPinName) |
| ezResult | Serialize (ezStreamWriter &inout_stream) const |
| ezResult | Deserialize (ezStreamReader &inout_stream) |
| const ezInstanceDataAllocator & | GetInstanceDataAlloator () const |
| ezArrayPtr< const ezUniquePtr< ezAnimGraphNode > > | GetNodes () const |
| void | PrepareForUse () |
Defines the structure and logic of an animation graph as a directed acyclic graph (DAG) of nodes.
An animation graph consists of interconnected nodes that process animation data. Nodes can sample animation clips, blend poses, handle logic and math operations, react to events, and output final poses. Data flows through typed pins that connect nodes together.
Graph Definition vs Instance:
Node Types:
Pin Types:
Animation graphs are typically created by the editor and stored in ezAnimGraphResource. At runtime, ezAnimController is used to load a graph resource, create an ezAnimGraphInstance and updates it each frame.
| void ezAnimGraph::PrepareForUse | ( | ) |
Prepares the graph for use by sorting nodes, assigning pin indices, and allocating instance data descriptors.
Must be called after all nodes and connections have been added and before creating instances. This is automatically called when deserializing a graph or when creating instances.