Search code examples
androidunity-game-enginetimelinepause

Unity timeline PlayableDirector.Pause() not working on Android devices


I am using Unity 2017's new timeline feature to build an old school type RPG tutorial where the instructions are displayed by a character with a text box of instructions and the player needs to click the screen or perform the instruction to view the next set of dialogue and continue with the tutorial.

I am using the PlayableDirector's function Pause() to pause my timeline, in order to have it stop running when the new dialogue appears or the player is performing the task at hand. When running in the Unity editor it works perfectly, pausing whenever the script calls Pause(), however when I run the game on an Android device it doesnt pause properly. The timeline will just keep running.

Does anyone know why this is happening and how to fix it, or is there another way of pausing? I've seen some people say to use a master timeline to control the other timelines but dont explain how to actually implement that (This is my first time using timelines so I am new at it)

Thanks,


Solution

  • So what appeared to be happening was the clips in the track that were calling Playabledirector.Pause() were too small and really powerful android devices were processing the timeline so fast it just skipped over the smaller clips without performing the functionality of those clips.

    Therefore I solved this simple by making the clips longer i.e last for more frames/seconds and that solved the problem.