using points to unlock next scene in Unity

by celine   Last Updated October 10, 2019 01:13 AM - source

below is my code and i'm a beginning game designer trying to make my first game for art school teehee! :)

not sure how to unlock the next level with a scene i've already made called Rust_Room

any ideas? :o i also attached the error codes im getting!

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

public class Example
    HUD hud;
    int points;

    const int ScorePrefix = "Score:";
    int score;

    public void LoadLevel()
        if ("Score==45")
        // load the nextlevel
        SceneManager.LoadScene(SceneManager.GetSceneByName(Rust_Room)().buildIndex + 1);

}[![enter image description here][1]][1]
Tags : unity

Related Questions

Unfortunately game has stopped

Updated July 02, 2019 11:13 AM

Unity Shader-Graph randomly tiled sprite

Updated May 24, 2020 02:13 AM

How to animate objects in Unity 3D

Updated July 12, 2015 13:05 PM