mirror of
https://github.com/peng-zhihui/ElectronBot.git
synced 2026-10-22 07:06:06 +08:00
28 lines
472 B
C#
28 lines
472 B
C#
namespace UIWidgets.Examples
|
|
{
|
|
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// Exit option for standalone build.
|
|
/// </summary>
|
|
public class StandaloneExit : MonoBehaviour
|
|
{
|
|
#if !UNITY_STANDALONE
|
|
/// <summary>
|
|
/// Disable gameobject if not standalone build.
|
|
/// </summary>
|
|
protected virtual void Start()
|
|
{
|
|
gameObject.SetActive(false);
|
|
}
|
|
#endif
|
|
|
|
/// <summary>
|
|
/// Quit.
|
|
/// </summary>
|
|
public virtual void Quit()
|
|
{
|
|
Application.Quit();
|
|
}
|
|
}
|
|
} |