Tanoda
pb_LoadLevel.cs
Go to the documentation of this file.
1using UnityEngine;
2using System.Collections;
3#if !UNITY_5_2
4using UnityEngine.SceneManagement;
5#endif
6
7namespace GILES
8{
12 public class pb_LoadLevel : MonoBehaviour
13 {
14 // The name of the level to load. Must be added to the build settings.
15 public string levelName;
16
17 public void Load()
18 {
19#if UNITY_5_2
20 Application.LoadLevel(levelName);
21#else
22 SceneManager.LoadScene(levelName);
23#endif
24 }
25 }
26}