How to Skip a Cutscene and return to the game

Press S to Skip

Tristan Engel
2 min readOct 12, 2021

In this article we create the functionality to skip our intro cutscene. We also had to make the same adjustments as in our mid game cutscene, since we want to return to our game and continue playing. Like switching the camera back.

How to return to the game after playing a cutscene

In a previous article we showed how we return to the game after the cutscene is finished. We will need the same setup on the current cutscene as we have in our mid game cutscene as in the article below.

To skip the cutscene we chose to use the Playable Director from code. This is the component that controls the timeline.

From the Scripting Reference we can find we need to use an library:

using UnityEngine.Playables;

GameManager Script

Here we use to script to set the time of the timeline to near the end. This way the timeline will still activate and deactivate the right gameobjects for us.

The bold parts are relevant to skipping. The rest is needed to start the BGM after the cutscene.

public PlayableDirector introCutscene;private bool _isBGMON = false;void Update()
{
if (Input.GetKeyDown(KeyCode.S) && _isBGMON == false)
{
introCutscene.time = 61f;
AudioManager.Instance.PlayBGM();
_isBGMON = true;
}
}

--

--

Tristan Engel

Aspiring developer that’s self-learning Unity & C# to transition to a career with Unity. I got a passion for creating interactive experiences.