Jump to content

unity script help

Agena_
Go to solution Solved by trag1c,

https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.LoadScene.html

 

SceneManager.LoadScene("Scene Name", LoadSceneMode.Single);
// Alternatively you can use the index specified in the build parameters of the project
int sceneIndex = 1;
SceneManager.LoadScene(sceneIndex, LoadSceneMode.Single);

I highly suggest looking at the documentation Unity has available because it has numerous examples available and it is easily searchable.

i have a timer for a game.

i want it to open a scene when time hits 0

 

on line 27 i just have a console log, how can i make it open a scene?

thanks

648000508_timequery.png.ab692bb3a9482790962eb17fdb3590b8.png

Link to comment
Share on other sites

Link to post
Share on other sites

https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.LoadScene.html

 

SceneManager.LoadScene("Scene Name", LoadSceneMode.Single);
// Alternatively you can use the index specified in the build parameters of the project
int sceneIndex = 1;
SceneManager.LoadScene(sceneIndex, LoadSceneMode.Single);

I highly suggest looking at the documentation Unity has available because it has numerous examples available and it is easily searchable.

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×