Skip to content

Level Select

Eruruw edited this page Jan 12, 2024 · 9 revisions

Screenshot (62)

Menu Buttons

Uses the player's raycast object to click a button, activating the event script.

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

public class SceneController : MonoBehaviour
{
    public void OfficeScene()
    {
        SceneManager.LoadScene("Office");
    }

    public void TrafficScene()
    {
        SceneManager.LoadScene("Traffic Collision");
    }

    public void MainMenuScene()
    {
        SceneManager.LoadScene("Main Menu");
    }
}
  • Office
    Loads the office scene on click.
  • Traffic Collision
    Loads the traffic collision scene on click.

Clone this wiki locally