如何从统一播放器返回到运行Android活动previous? [英] How to return from Unity Player to previous running Android Activity?

查看:238
本文介绍了如何从统一播放器返回到运行Android活动previous?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有同样的问题,因为这个话题<一提到href=\"http://stackoverflow.com/questions/7754373/integrating-unity-with-eclipse-back-button-click\">Integrating团结与Eclipse:后退按钮单击但建议的解决方案没有奏效

I have the same problem as mentioned in this topic Integrating Unity with Eclipse: Back Button Click but the suggested solutions didn't work.

我有一个统一播放器嵌入在一个原生Android应用程序。我可以开始统一播放器没有问题,但现在我想回到我的previous活动与后退按钮。我已经尝试过Application.Quit从Unity侧面和侧机器人完成(),均将关闭整个应用程序。我也试着开始从团结方面一个新的活动,但这也不管用,我想这是因为我的工作片段。我的活动设置如下:

I have a Unity Player embedded in a Native Android Application. I can start the Unity Player without a problem but now I want to go back to my previous activity with the back button. I already tried Application.Quit from Unity side and finish() from android side, both closes the whole application. I also tried to start a new Activity from the Unity context but this doesn't work either, I think this is because I work with fragments. My Activity setup is as follows:

MainActivity,其中几个片段嵌入。其中两个包含列表从中我可以开始新的活动,显示我的列表元素的详细视图。细节的看法也片段中,你可以刷卡左,右previous /下一个元素(类似于Gmail应用)。从详细信息视图中,你就可以开始团结有一些增强系统与高通vuforia框架。

MainActivity where several fragments are embedded. Two of them contain Lists from which I can start a new Activity which shows me detail views of the List elements. The detail views are also fragments in which you can swipe left and right to previous/next element (similar to gmail app). From within the detail view, you can start Unity to have some augmentations with the qualcomm vuforia framework.

到现在为止一切正常,但我不能从UnityPlayer回去的详细信息视图。

up to this point everything works, but I can not go back from the UnityPlayer to the details view.

有没有人有任何想法如何实现这一目标?

Does anyone have any idea how to achieve this?

谢谢!

推荐答案

当你回到preSS团结活动的整个过程会被杀死。因此,当你开始通过机器人活动的统一活动,开始在不同的工艺团结的活动。您可以通过在项目的Andr​​oid清单文件中声明该做到这一点。

When you back press in unity activity the whole process will be killed. Therefore when you are starting a unity activity through android activity , start unity activity in different process. You can do this by declaring this in android manifest file of project.

这篇关于如何从统一播放器返回到运行Android活动previous?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆