一,遊戲退出按鈕:
腳本Out:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Out : MonoBehaviour {
public void Click()
{
UnityEditor.EditorApplication.isPlaying = false;
}
}
拖到退出按鈕上。
在Inspector面板上配置按鈕:
二,打包發佈:
點擊左上角File——BuildSettings
在彈出界面,點擊Build,進行打包