Can I start a Unity game from an Android application and return from Unity to the application?

I have a build project for Android in native Android code [Java]. and another game project is built in unity. I want to start a game project from an Android application, and upon exit or completion, return to the android application.

Unity? The game project contains the following hierarchy of files, I have no taste for this subject of unity. Well, I'm not even sure if this is a project based on unity?

Screenshot of game project files http://img821.imageshack.us/img821/321/4ird.png

+4
source share
1 answer

You must have two actions in your application: one using Java code, and the other using Unity. Android is already pretty good at switching between actions.

Check out: http://developer.android.com/training/basics/firstapp/starting-activity.html

You probably need to add your Java project as a plugin in Unity and override AndroidManifest.xml in the Unity project to load Java activity. Check out this documentation on expanding android projects in Unity: http://docs.unity3d.com/Documentation/Manual/PluginsForAndroid.html

0
source

Source: https://habr.com/ru/post/1498560/


All Articles