Files
YGOProUnity_V2/Assets/NGUI/Examples/Scripts/Other/LoadLevelOnClick.cs
T
lllyasviel 72f9f431f4 first
2017-05-14 16:15:52 +08:00

15 lines
260 B
C#

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);
}
}
}