Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Bug Moving from Page to Page

Discussion in 'Getting Started' started by shreyram25, Apr 11, 2024.

  1. shreyram25

    shreyram25

    Joined:
    Apr 11, 2024
    Posts:
    2
    Good evening everyone!
    I am a beginner in Unity and I'm trying to go from one scene to another but I can't figure out how to do it.

    using UnityEngine;
    using UnityEngine.SceneManagement;

    public class StartButton : MonoBehaviour
    {
    void Start()
    {

    }

    public void LoadCharacterSelection()
    {
    SceneManager.LoadScene("CharacterSelection");
    }
    }

    The name of the original scene is StartUp and the name of the scene I want to go to is called CharacterSelection. Please help as soon as possible as my deadline is in an hour.
     
  2. Chubzdoomer

    Chubzdoomer

    Joined:
    Sep 27, 2014
    Posts:
    136
    You haven't actually stated what's currently happening when the method in that script is called (if it's being called at all).
     
  3. shreyram25

    shreyram25

    Joined:
    Apr 11, 2024
    Posts:
    2
    I've never used Unity before, so I am unsure as to what that means, please clarify what line of code goes where, or even better edit the code for me, thank you for your help!