Files
tianrunCRM/Assets/CoolapeFrame/3rd/NGUI_Enhance/Examples/Scripts/Other/LoadLevelOnClick.cs

15 lines
274 B
C#
Raw Normal View History

2020-07-04 14:41:25 +08:00
using UnityEngine;
[AddComponentMenu("NGUI/Examples/Load Level On Click")]
public class LoadLevelOnClick : MonoBehaviour
{
public string levelName;
void OnClick ()
{
if (!string.IsNullOrEmpty(levelName))
{
Application.LoadLevel(levelName);
}
}
}