In most animation tools, logic is attached to individual layers. In AnimGraphLab, logic is attached to Graphs.
This approach allows to build complex, reusable interactive components (like buttons, sliders, and toggles) that behave as a single, self-contained unit.
Hierarchy
There are two places where a State Machine can live:
- Root graph: main “Scene”. Logic built here controls the entire project.
- Subnets: subnet is a node that contains its own internal graph. When you “Dive In” to a Subnet, you are editing a self-contained Component.
The "One Way" rule
To keep your projects organized and scalable, follow this rule:
Nodes hold artwork and keyframes. Graphs hold Animation Clips and the State Machine.
When the State Machine plays a clip named “Hover,” it isn’t telling a specific node to move; it is telling the entire Graph to move to that specific time range. Any node that has keyframes inside that range will animate in sync automatically.
Variable scope
Variables are local to the graph they belong to.
If you build a “Button” inside a Subnet and create a variable called isHovered, that variable only exists inside that Subnet. If you drag 10 buttons onto your main canvas, they each have their own independent isHovered state. They won’t interfere with each other.
Info: This is explicitly designed for reusability. By keeping logic encapsulated inside Subnets, you can build a rich library of interactive parts and reuse them anywhere in your projects.