Closed kurismakku closed 2 years ago
I could expose that @kurismakku , I will prepare that for the next release
Thanks, @brunomikoski, that's amazing! And this is an amazing idea, kinda a dream come true actually. Also, I was able to receive the update through Unity Package Manager by using an URL to this git.
Here is the code I was trying to add, the idea is that sometimes animations can be called per frame, so this method makes sure that the sequence restarts at a specific time, not too early and not too late.
public virtual void PlaySequence(float startTime)
{
float tweenProgress = 0f;
if (PlayingSequence != null && PlayingSequence.IsActive())
tweenProgress = PlayingSequence.ElapsedPercentage();
if (PlayingSequence == null) Play();
else
{
if (PlayingSequence.IsPlaying())
{
if (tweenProgress > startTime) tweenProgress = startTime;
PlayingSequence.Goto(tweenProgress * PlayingSequence.Duration());
Play();
}
else
{
Play();
}
}
}
Thanks, @brunomikoski, that's amazing! And this is an amazing idea, kinda a dream come true actually. Also, I was able to receive the update through Unity Package Manager by using an URL to this git.
Here is the code I was trying to add, the idea is that sometimes animations can be called per frame, so this method makes sure that the sequence restarts at a specific time, not too early and not too late.
public virtual void PlaySequence(float startTime) { float tweenProgress = 0f; if (PlayingSequence != null && PlayingSequence.IsActive()) tweenProgress = PlayingSequence.ElapsedPercentage(); if (PlayingSequence == null) Play(); else { if (PlayingSequence.IsPlaying()) { if (tweenProgress > startTime) tweenProgress = startTime; PlayingSequence.Goto(tweenProgress * PlayingSequence.Duration()); Play(); } else { Play(); } } }
I can definitely add this for the next update, please let me know if you need anything else.
Implemented on the release
Hi there, I'm trying to add some additional functionalities to the package locally, but because some of the methods are internal, that's not possible.
AnimationSequenceEditorGUIUtility.PauseButtonGUIContent
I also tried another way, by extending the Animation Sequencer Custom Editor, but that class is sealed as well.