【unity】如何让Unity应用在退出时关闭某些服务

【背景】

上一篇讲了如何实现运行Unity程序开启某项服务的需求,那么退出Unity时自然就有需求关闭此服务。

【方法】

假设服务是通过某个exe驱动的,在某个Game Object上追加如下代码:

using UnityEngine;
using System.Diagnostics;

public class ExitWithCMDCommand : MonoBehaviour
{
   
    
    
    void Start

猜你喜欢

转载自blog.csdn.net/weixin_41697242/article/details/135046771