运行 单独线程上的游戏不会阻止整个应用程序关闭 - Android Studio 上的 Unity
Running game on separate thread does not stop the whole application from being closed - Unity on Android Studio
或多或少的标题。我在 Unity 中调用 Application.quit(),然后在我的 Android Studio 应用程序的 onUnityPlayerQuitted 方法中,我调用此代码
Intent intent = new Intent(this, Exit.class);
startActivity(intent);
但是,这只会关闭整个应用程序。我的 androidmanifest.xml
中已经有了这些陈述
android:launchMode="singleTask"
android:process=":UnityPlayerActivity"
所以我不太明白为什么我的应用程序会关闭,而不是按照我的要求进入退出 activity。
通过在 Unity 中将 Application.quit 更改为 Application.Unload 解决了这个问题,然后使用上述 xml 标签在不同的进程上设置活动 运行。
或多或少的标题。我在 Unity 中调用 Application.quit(),然后在我的 Android Studio 应用程序的 onUnityPlayerQuitted 方法中,我调用此代码
Intent intent = new Intent(this, Exit.class);
startActivity(intent);
但是,这只会关闭整个应用程序。我的 androidmanifest.xml
中已经有了这些陈述android:launchMode="singleTask"
android:process=":UnityPlayerActivity"
所以我不太明白为什么我的应用程序会关闭,而不是按照我的要求进入退出 activity。
通过在 Unity 中将 Application.quit 更改为 Application.Unload 解决了这个问题,然后使用上述 xml 标签在不同的进程上设置活动 运行。