Replies: 8 comments 12 replies
|
My initial opinion when implementing LitMotion was that asynchronous processing should be left to async/await and Rx, and that tweens should not have functions like sequences. However, when creating a composite animation, I ran into a problem where it was difficult to perform operations such as complete all at once using The |
|
Also, this feature will not be included in the regular package, but will be distributed as a separate package (LitMotion.Sequences). Therefore, you can install it as needed. |
|
MotionSequence.CurrentHandle will be useful to change PlayBackSpeed. |
|
Can I add delay between Appends - ? |
|
Although allocations occur, they could be reproduced in an easy to write coroutine-like form. IEnumerable<SeqYieldPoint> SequenceFunc(SeqCoroutine s)
{
yield return s.Wait(LMotion.Create(0f, 180f, 1f).BindToEulerAnglesZ(target1));
yield return s.Wait(LMotion.Create(0f, 180f, 1f).BindToEulerAnglesZ(target2));
yield return s.Wait(LMotion.Create(0f, 180f, 1f).BindToEulerAnglesZ(target3));
Debug.Log(s.IsPlaying() ? "Is Playing" : "Force Complete");
yield return s.Wait(stackalloc MotionHandle[]
{
LMotion.Create(-2f, 2f, 1f).WithLoops(3, LoopType.Yoyo).BindToPositionY(target1),
LMotion.Create(-2f, 2f, 1f).WithLoops(2, LoopType.Yoyo).BindToPositionY(target2),
LMotion.Create(-2f, 2f, 1f).BindToPositionY(target3)
});
}
sequence = new SeqCoroutine(SequenceFunc); |
|
Hi, After trying LitMotion and I came here from the unity forum thread If there's a simple way I missed, please enlighten me. |
|
We added new Sequence features in #158, so this discussion is closed. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm currently considering adding the Sequence feature to LitMotion, and would like to get your opinions on it.
The current API proposal is as follows.SequencePlayModecan be specified asSequentialorParallel, andSequentialuses async/await usingValueTaskinternally.I made a few changes from the first draft.
SequencePlayModeis removed and all sequences are executed sequentially. However, you can also useAppendGroup()to add groups of motions to run in parallel.All reactions