Make the exit button in the menu hide if it can't be used there
This commit is contained in:
@@ -6,10 +6,17 @@ public class MenuScript : MonoBehaviour
|
||||
public Button exitButton;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
if (!Application.isMobilePlatform || Application.isEditor || Application.platform == RuntimePlatform.WebGLPlayer)
|
||||
{
|
||||
exitButton.gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
exitButton.onClick.AddListener(() =>
|
||||
{
|
||||
Application.Quit();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user