# Trigger new scene

**URL:** https://discussions.unity.com/t/trigger-new-scene/420228
**Category:** Scene & World Building
**Tags:** Scripting
**Created:** [August 10, 2010, 1:20pm UTC](https://discussions.unity.com/t/trigger-new-scene/420228 "2010-08-10T13:20:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![anon\_8282443](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@anon\_8282443](https://discussions.unity.com/u/anon_8282443)
#### Post date: [August 10, 2010, 1:20pm UTC](https://discussions.unity.com/t/trigger-new-scene/420228/1 "2010-08-10T13:20:18Z")

</div>

Hi im new to unity and i want to make a trigger and if the player is in the “triggerbox” i want the player to allow to go to the next scene.

also the player has to press a button to go to that scene.

I hope you can please help me.

---

<div class="post-metadata">

### Author: ![j\_y\_k](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@j\_y\_k](https://discussions.unity.com/u/j_y_k)
#### Post date: [August 10, 2010, 2:30pm UTC](https://discussions.unity.com/t/trigger-new-scene/420228/2 "2010-08-10T14:30:22Z")

</div>

For detecting when the player has touched the trigger, look at OnTriggerEnter(). For loading the next level, look at Application.LoadLevel().

The key press is just a program logic issue. Create a ‘level is complete’ variable somewhere, and set it to true when the player touches the trigger. Then, if the flag is true and the ‘to next level’ key was pressed, load the next level.
