LitMotion
LitMotion copied to clipboard
WithOnComplete,WithOnCancel,WithOnLoopComplete,WithCancelOnError also requires a GC free paradigm similar to Bind
Adding a state to each action would increase the size of ManagedMotionData too much.
https://github.com/AnnulusGames/LitMotion/blob/main/src/LitMotion/Assets/LitMotion/Runtime/Internal/ManagedMotionData.cs LinkedList is an effective way around this. #66 (However, I was personally told by the author that he was not inclined to do so because of the complexity of LinkedList.)
It is worth considering sharing a State. In most cases, the State used by multiple actions is likely to be the same. Even if it is different, a temporary type can be used to wrap it into a single State.