I'm confused, Application.loadedLevelName not working
Can someone tell me what's wrong with my code
I'm not getting any errors, but it's also not doing anything
and yes I've added the level I'm checking to Build Setting and yes it's ticked
using UnityEngine;
using System.Collections;
public class loadCheckTest : MonoBehaviour
{
public string Level = "timeLeftTest01";
// Use this for initialization
void Awake ()
{
if(Application.loadedLevelName == Level)
{
Debug.Log("onlevel");
}
}
}
Comment
What gets printed if you log the name? Debug.Log(Application.loadedLevelName);
?