将Unity3D游戏集成到Android / iOS活动中 [英] Integrating Unity3D game into Android/iOS activity
问题描述
早上好!
我刚刚使用Unity3D完成了一场游戏。我的同事们使用Eclipse ad XCode在原生Android和iOS中完成了一个应用程序。
I have just completed a game using Unity3D. My co-workers have each completed an app in native Android and iOS using Eclipse ad XCode.
问题是,我们需要将游戏集成到Android和iOS应用程序中通过在其中一个屏幕/场景/活动中激活它。
The problem is, we need to integrate the game into the Android and iOS apps by having it activate inside one of their screens/scenes/activities.
有关如何开始执行此任务的任何指示?我无法在网上找到任何有用的信息。在此先感谢,我们非常感谢任何帮助。
Any pointers on how I could get started on this task? I am unable to find anything helpful online. Thanks in advance, any help would be much appreciated.
更新
UPDATE
我们现在已将游戏成功集成到Android应用程序中。现在我们有另一个问题,在Unity中我们可以输入一个退出游戏的按钮。这是一个很棒的游戏是一个独立的应用程序。但现在它已经在Android应用程序中,我们正在寻找一种方法来退出游戏而不会退出整个应用程序。
We now have the game successfully integrated into an Android App. Now we have another issue, in Unity we can input a button the quits the game. This was great while the game was a standalone app. But now that it is inside the Android app, we are looking for a way to exit the game without quitting the entire app.
我们可以使用特定的代码片段吗?用于退出Unity游戏但不退出整个应用程序?谢谢!
Is there a specific snippet of code we can use to back out of the Unity game but not exit the whole application? Thanks!
推荐答案
Android:
-
构建设置 - > Android - >选中Google Android Project - >导出
Build Settings -> Android -> Check "Google Android Project" -> Export
打开Eclipse - >导入 - > Android /现有Android代码进入工作区 - >选择上面的导出项目。
Open Eclipse -> Import -> Android/Existing Android Code Into Workspace -> Choose Exported Project above.
现在,您的Unity游戏是一个活动中的一个视图对象。您可以在正常的Android项目中以正常方式添加其他活动或其他视图。
Now your Unity Game is one view object in one activity. You can add others activities or others views by normal way in normal Android project.
这篇关于将Unity3D游戏集成到Android / iOS活动中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!