In Play Mode, onEnter() always do when every time click Play button(not click Stop button) and startTime > 0
But, onEnter() just do once when startTime = 0..Is it correct ??
The problem may cause my custom clip not do init in onEnter()…Orz
OnEnter is called every time the cutscene time enters (or exceeds) the clip’s start time (and before Update), not just once.
This is true for both editor and playmode.
There could be something else going on here. Can you share your custom clip?
Thanks.
Not just my custom clip, you can try this..
1,write Debug.Log in TranslateBy, RotateTo onEnter<Drag clip to IN = 0> and ActorActionTrack, ActorGroup IDirectable.Enter
2,Click play button first<do not click stop button when play end>, It output log correctly
3,Click play button again<do not click stop button>, log not output…..
4,Drage TranslateBy, RotateTo clip to IN != 0, play again, it will output log, but track and group still not output log
After:
if (playingDirection == PlayingDirection.Forwards)
{
if (currentTime >= previousTime) currentTime += delta;
}
else
{
if (currentTime <= previousTime) currentTime -= delta;
}
2, TriggerBackward In TimeInPointer, this is for click on timeline not call onEnter when clip startTime = 0
Before:
if (currentTime < target.startTime || currentTime <= 0)