Hello,
Sorry if this is not the correct subforum to post this question. Editor didn’t seem the the right place either.
Unity has a built in node graph api that let’s you build custom graphs for things like Dialogue trees, AI, etc.
Is it possible to have a custom node that starts an animation and when a specific Animation event gets hit it continues down to the next node? If no animation event gets hit and the animation ends, it goes down a different node?
If this is, how would someone go about creating it?
Sorry if this is vague. Thank you in advance
This seems to just be made of moderately-simple parts:
-
scripting on the given node to kick off an animation
-
some script to accept the animation event, or observe the end of the animation
-
input on another node coming from the event observer
Or am I misunderstanding your question?
More than likely possible, just a case as to whether it’s possible within your coding knowledge.
Just note that the experimental graph view API is more or less being superseded by the Graph Tools Foundation package: https://docs.unity3d.com/Packages/com.unity.graphtools.foundation@0.11/manual/index.html
1 Like
Thank you for this link. Very helpful
Nah, you nailed it. Thank you. I guess I’m caught up on #2 (how to observe the animation event outside of a Monobehavior attached to the animator’s gameobject)
GTF package is abandoned and can’t produce working builds. It was last updated more than a year ago. They’re working on integrating GTF into the core of the engine now. No ETA has been given and it doesn’t look like it’s part of 2023.1 alpha.
Unity folks working on GTF recommend using GraphView themselves. Public Graph Tools Foundation API is not their priority.
Man on one hand I see people saying not to use Graph View, on the other hand I see people not to use GTF.
I think either way, making node based stuff in Unity is in a sorry state. I guess folks should just use Xnode in the meantime.