Is it possible to override the pause?

So I have the level automatically paused for several seconds which is what I want, but I was just wondering if its possible to ignore that pause to have a cool entrance with the playable character? So he moves to his start position while its paused for the duration. Right now he’s just there lol. Would be nice to have him fly in instead.

Heres the code for the pause:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class levelCountDown : MonoBehaviour
{


   public GameObject CountDown;
 
   private void Start()
    {
        StartCoroutine("StartDelay");
      
                                    
}

    void Update()
    {

    }
    IEnumerator StartDelay()
    {
        Time.timeScale = 0;
        float pauseTime = Time.realtimeSinceStartup + 3f;
        while (Time.realtimeSinceStartup < pauseTime)
            yield return 0;
        CountDown.gameObject.SetActive(false);
        Time.timeScale = 1;
       
   }

}

You can have your character used unscaled time during the entrance. Any scripts on the character can use Time.unscaledDeltaTime in place of Time.deltaTime, the Animator has a dropdown for “Update Mode” that you can change to “Unscaled time” (which again, you can change for only the cutscene). Beyond that anything else would be very fiddly to do (I’m not sure if physics would be possible at all), but those two things hopefully will allow you to get at least your character entrance scene done.

1 Like

Instead of just having the current player controller run unconditionally, make two player controllers:

  • the current one you have (we’ll call that “standard”)
  • an intro fly-in one you will make (we’ll call that “intro”)

Finally make a “manager” controller on the player that first loads and lets the “intro” controller run.

When the intro controller is done, the manager removes it and installs (or enables) the “standard” controller and off you go.

The intro controller can just be the 2-second pause for now, then you can build it up in stages: add a fly in animation, add music, add fancy Cinemachine camera work, etc.

As long as it ends and signals the manager to fire up the “standard” controller, you’re golden and you can insert more and more intro to make it spiffy.

This is generally how these slick in-game-to-play type cutscenes are done, and Unity is about the easiest possible game engine to do it in.

This same process can be used to wedge in other controllers: you have a trigger area in the scene that signals the content manager to load the “cutscene1” controller, which will remove the standard controller, and off goes your cutscene.

When the cutscene ends, back to the standard controller.

And of course on out to a celebratory “we did it dance” controller before the finale screen loads.