1
votes

I'm trying to show a GameObject (from Unity) in my AndroidStudio Project. The idea is this:

  1. Open the main activity of my app
  2. Click on a button-> show a gameObject

I created an Unity Project whith a simple object and build it as a GradleProject. I've open this project in Android studio and added a main activity layout (with a frame layout and a button inside). Now when I open my application:

  1. The main activity layout is shown.
  2. I click on the button, the UnityPlayer fill the frame layout and show my gameObject.

The problem is that before my gameObject is shown, it appears the Unity Splash Sceen. I know that with the Free Version of unity I can't remove it but I wanted to know if there is a way to show this Splash Screen when the application is started. I want to have someting like this:

Start App -> show Splash Screen -> show Main activity layout -> [when button pressed -> show gameObject]

Eventually I apologize for my English and thank you for the help you will give me

1

1 Answers

0
votes

It seems like it would be easier to recreate your main activity layout in Unity. That way your whole app would be a unity app and you wouldnt have the problem with multiple apps trying to run concurrently. (which i think isn't possible without one of them going into standby or stop)

If you really want to stick with this multiple apps stitched together idea, I suppose it could be worth a try to make the unity app start at first, then have that start your main activity and from there you can go back to the unity app. Although i would really recommend my first idea.

All in all the unity app would have to start first, as the splash screen is tied to the app start. So you have to time that with your other apps start in order to work like you want.

Both solutions would create your desired behaviour. I hope this helps :)