/** * 重启APP (此方法针对unity) */ public static void RestartApp(){ Intent intent = new Intent(UnityPlayer.currentActivity, UnityPlayer.currentActivity.getClass()); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); UnityPlayer.currentActivity.startActivity(intent); android.os.Process.killProcess(android.os.Process.myPid()); }