您当前的位置: 首页 >  游戏

每日出拳老爷子

暂无认证

  • 3浏览

    0关注

    135博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

【Unity游戏开发基础】如何用脚本退出游戏

每日出拳老爷子 发布时间:2022-06-09 22:08:54 ,浏览量:3

【背景】 不废话了,这个当然是最常用的。写个脚本,把方法挂载在Button元素的动作上就可以了。 【脚本】

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class jumpScene : MonoBehaviour
{
    public void QuitGame()
    {
        Application.Quit();
    }
}

核心方法是QuitGame

关注
打赏
1657016083
查看更多评论
立即登录/注册

微信扫码登录

0.0374s