Search Unity

Multi Path Storytelling

Discussion in 'Game Design' started by Ciarawc, Mar 2, 2019.

  1. Ciarawc

    Ciarawc

    Joined:
    Mar 2, 2019
    Posts:
    1
    Hey I'm trying to write a code (using C sharp) to be able to go from scene A to scene B OR C.
    For example if YES is chosen, you are directed to scene B
    If NO is chosen you are directed to scene C
    Any help or advice would be appreciated thanks!
    Ciara WC
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    5,494
    What part of this are you having trouble with?

    Code (csharp):
    1. if (choice)
    2. {
    3.     SceneManager.LoadScene("SceneB");
    4. }
    5. else
    6. {
    7.     SceneManager.LoadScene("SceneC");
    8. }