Awesome
AnimFlex
An open source project to solve the problem of having to create performant inspectable sequences. There's Timeline now, but it's not as performant, and as designer friendly as one would like it to be; to create a custom event, you have to go through hell to get it there and ready to use for designers. AnimFlex is a super-performant array-based sequencing solution to create custom event-based clips on the fly.
Manual
- you create a "Clip Sequence Component"
- then click on the Add button and add new clip node
- for example, I added a "log" clip node
- Then obviously you can rename, add delay, tweak parameters for your clip node and add next nodes that'll play after this finishes
- Let's add a new log node and make it log "I'm the second node!" and play 3 seconds after the first node:
- Now to make the 2nd node play after the 1st one finishes, you can either turn on "Play Next After Finish" toggle on the 1st node, or add the 2nd node to the "Next Clip Nodes" list
- and play and check the results inside the Console
- That's it!
- Now you can also add function calls (UnityEvent) as a clip too, and call your custom functions in your custom scripts. up to 3 argumental events are valid so far
Add custom Clips
- Create a new class that derives from Clip
- You can write your custom logics inside OnStart, and add custom serialized fields inside the class itself to get inputs from inspector.
For this example, let's just say hi to whoever is calling this clip (note that you have to call
End()
after you're done with your logic)
- Now a more useful clip perhaps, huh? one that, for example, can take DoTween animations and play them all at once with predefined delay in a linear way