PlayableDirector.time not accurate enough?
Hello,
I have been trying to pause my timeline at an exact given second from my script, but it does not seem to work when you provide exact seconds. For example, I am trying to pause at 28 seconds with something like this:
if (myDirector.time == 28)
{
myDirector.Pause();
}
But it does not work. However, if I instead give it a little bit of a range, like below, it catches it and it actually pauses.
if (myDirector.time >= 27.9 && myDirector.time <= 28.1)
{
myDirector.Pause();
}
What gives? How can I pause it at an exact time?
Perhaps the time never actually equals to an exact second in time, because when I print the time it's something like "27.9035531785339".
Your answer
Follow this Question
Related Questions
Prevent Animation From Playing Until Button is Pressed. 4 Answers
Render image for left and right eye not as expected. Any advice ? 0 Answers
2D timeline starts from different location 1 Answer
No option to add "Control Playable Asset Clip" 1 Answer
How can I allow the user to pause a timeline in-game? 0 Answers