# Application.LoadLevel not loading levels

**URL:** https://discussions.unity.com/t/application-loadlevel-not-loading-levels/113656
**Category:** Questions & Answers
**Created:** [August 13, 2014, 3:07am UTC](https://discussions.unity.com/t/application-loadlevel-not-loading-levels/113656 "2014-08-13T03:07:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Endergeek](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@Endergeek](https://discussions.unity.com/u/Endergeek)
#### Post date: [August 13, 2014, 3:07am UTC](https://discussions.unity.com/t/application-loadlevel-not-loading-levels/113656/1 "2014-08-13T03:07:42Z")

</div>

Hi there!  
Just a bit of an FYI before we begin–I’m super new to all of this, so please excuse my newbishness.

I have a simple script for a “portal” to the next level at the end of a basic parkour course. I put it together off of a bit of googling and the API documentation provided by unity. I have an invisible 100x1x100 cube at the bottom of the world to reset you when you fail the course–and that works fine. But when I try to load a new level it doesn’t want to work.  
Here is the code:

```
var levelToLoad : String = "level2";
function OnTriggerEnter(other : Collider) {
 Application.LoadLevel(levelToLoad); 
}

```

---

<div class="post-metadata">

### Author: ![rutter](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/rutter/32/301335_2.png) [@rutter](https://discussions.unity.com/u/rutter)
#### Post date: [August 13, 2014, 3:06am UTC](https://discussions.unity.com/t/application-loadlevel-not-loading-levels/113656/2 "2014-08-13T03:06:35Z")

</div>

The code itself looks fine, but there’s two ways it might fail:

1. Is the level to load configured in your [build settings](http://docs.unity3d.com/Manual/PublishingBuilds.html)? The `LoadLevel` function can only load levels that have been added to the build.
2. Is [OnTriggerEnter](http://docs.unity3d.com/ScriptReference/MonoBehaviour.OnTriggerEnter.html) being called in the first place? You might add a simple [Debug.Log](http://docs.unity3d.com/ScriptReference/Debug.Log.html) call, just to make sure.

I’m inclined to hold this in the moderation queue; if it’s either of those two points, then this falls under frequently asked questions. It’s not a bad question, we’re just trying to be more careful about how many of those we post.
