首页 > 解决方案 > 从一个 Unity 应用 (.exe) 更改为另一个 Unity 应用 (.exe)

问题描述

有没有办法从一个 Unity 应用程序更改为另一个?我说的不是场景变化,而是整个应用程序本身。比如:(a) 从 Game_1.exe 更改为 Game_2.exe (b) 从 Game_1.apk 更改为 Game_2.apk

标签: unity3d

解决方案


您可以使用该process.Start()方法启动新进程(例如 .exe),如此处文档中所述

来自上述文档的示例:

using (Process myProcess = new Process())
{
    myProcess.StartInfo.UseShellExecute = false;
    // You can start any process, HelloWorld is a do-nothing example.
    myProcess.StartInfo.FileName = "C:\\HelloWorld.exe";
    myProcess.StartInfo.CreateNoWindow = true;
    myProcess.Start();
}

推荐阅读