AnimGraph Instancing


I am trying out the new AnimGraph and ActionGraph extensions.
I want to reuse an AnimGraph and an ActionGraph to have multiple characters to walk on a predefined path.

Since the “path points” scene from “Window → Animation → Animation Graph Samples” serves this use case I loaded this scene and tried to add a new character to the scene by duplicating the one already there.

The character already has the AnimationGraph and the ActionGraph specified in its attributes, but when I click play, the new character does not move around and only stays idle in its place.

I also tried loading the character from scratch and adding the AnimationGraph and ActionGraph to it manually, but this did not help either.

The documentation states that

“AnimGraphs utilize instancing , so that one graph can be utilized by multiple characters…”.

It is unclear to me how to use this feature exactly. I tried setting the “Instanceable” attribute from the AnimationGraph and the ActionGraph to True, but this did not help either.

How can I make them reusable?

Hello @jominga! Thanks for reaching out to us. I asked the development team for some assistance in answering your questions. I will post back here as soon as I hear back!

Hello @jominga! I heard back from the development team and here is what they were able to find.

The reason it doesn’t behave as the user expects, is the action graph in the scene only writes the path points to the first instanced character. The simplest way around this is, in the action graph, connect the Out pin on the ‘Draw Screen Space Text’ node to the Exec In pin of the ‘Animation Write Graph Variable’ node. That will cause the path points to be written to each instance when the action graph runs, and all instances will perform the path following demonstrated.

Let me know if this information helps!

1 Like

It worked! Thank you so much!