LitMotion icon indicating copy to clipboard operation
LitMotion copied to clipboard

WithOnComplete,WithOnCancel,WithOnLoopComplete,WithCancelOnError also requires a GC free paradigm similar to Bind

Open eefan000 opened this issue 10 months ago • 2 comments

eefan000 avatar Jan 07 '25 11:01 eefan000

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.)

Akeit0 avatar Jan 11 '25 07:01 Akeit0

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.

eefan000 avatar Jan 11 '25 08:01 eefan000