using points to unlock next scene in Unity

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

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


Updated July 02, 2019 11:13 AM

Updated July 12, 2015 13:05 PM

Updated July 13, 2015 13:05 PM