Error:CS0117 How can do I code booleans with appilicationLoadLevel C#
My player needs to have an certain amount of point . If he or she want to advance to the next level . I want the ApplicationLevel to load up when player reaches the points. Here is what I got so far :
using UnityEngine; using System.Collections; using UnityEngine.UI;
public class ScoreManager : MonoBehaviour { public static int Points; Text text; public static bool canContinue = false ;
 void Awake () 
 {    
     text = GetComponent <Text>();
     Points = 0;
 }
 
 
 
 void Update () 
 {  
 
 
 {
     text.text = "Points:" + Points;
 }
 
 if (Points < 40)
 {
     canContinue = false;
 }
 
 else if (Points < 60)
 {
     canContinue = true;
     Application.LevelLoad("MEP_Scene_05");
     
 }
 
 
 
     
 }
    
   
}
Answer by Rob2309 · Apr 07, 2016 at 06:09 PM
First of all, I think with this system you don't even need to have this boolean, unless you use it for something else in your project.... Then, I think the Method is called Application.LoadLevel(...), but these old level loading methods are deprecated to my knowledge, so you should take a look at the new UnityEngine.SceneManagement Package (http://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.html)
Answer by b1gry4n · Apr 07, 2016 at 10:29 PM
 if (Points >= 40) //if the points are greater than or equal to 40, load level
  {
      Application.LevelLoad("MEP_Scene_05");
  }
 
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                