Unity 3D: Activating A Cutscene From Gameplay

Поделиться
HTML-код
  • Опубликовано: 26 дек 2024

Комментарии • 6

  • @danthonyhill9906
    @danthonyhill9906 4 года назад +1

    Hey nice tutorial !!
    Question though, how would it go back to gameplay when cutscene finish?

    • @vroyett
      @vroyett 4 года назад +1

      Hello bro, did you manage to go back to gameplay when cutscene finish?

    • @abdelazizetaib9305
      @abdelazizetaib9305 4 года назад

      @@vroyett bro did u found Any solution fo that

    • @fachri17
      @fachri17 4 года назад

      @@abdelazizetaib9305 just add some kind of timer thingy, for example. ur cutscene 5 seconds long. so just add a line of code that make u exit the cutscene in 5 second. if u want to make a game, and dont know how to code, just use unreal engine4 or unity playmaker

    • @DarkDax
      @DarkDax 4 года назад +1

      Just in case somebody stumbles across this, you can either use the Director's callback functions when playback has started and stopped, or emit a 'Signal' at the end. It's like an event that will tell everything subscribed to it to do a 'thing' (whatever it is that you want it to do after receiving the signal). You could use that to restore player control in code, or whatever you need to do in order to go back to gameplay. For example, you could then disable the virtual cameras so they no longer 'control' your main view and use a signal to give back control.

    • @TETE
      @TETE 3 года назад +3

      anyone who wants when cutscene is ended back to normal mode there is script; public GameObject _cutsceneComp;
      public Transform _mainCam;
      public GameObject _collider;

      void Start()
      {
      _collider.GetComponent().enabled = true;

      }
      private void OnTriggerEnter(Collider other)
      {
      if(other.tag == "Player")
      {
      Camera.main.transform.position = _mainCam.transform.position;
      Camera.main.transform.rotation = _mainCam.transform.rotation;
      Invoke("endCutScene", 9f);
      _cutsceneComp.SetActive(true);
      }
      }

      void endCutScene()
      {
      _collider.GetComponent().enabled = false;
      _cutsceneComp.SetActive(false);
      }