google-ar / arcore-unity-sdk

ARCore SDK for Unity
https://developers.google.com/ar
Other
1.4k stars 401 forks source link

Unity loading time for ARScreen in Android native(Java) app #195

Closed rramprasad closed 6 years ago

rramprasad commented 6 years ago

I am exporting android code from Unity and embedding an UnityPlayerActivity as part of my native android app. So Whenever I launch ARScreen, it loads custom splashscreen and load ARCamera and 3DObject. This screen launch takes time because,it loads Unity game engine.

Is it any other way to preload this screen in Android? How Pokemon shows ARScreen as soon as it launches. I want to show screen like this without loading in between.

small-potatoes commented 6 years ago

Hey there,

By "ARScreen" are you referring to an ARCore Unity SDK application rendering an passthrough camera background? For the splash screen, Unity allows you to remove this for some licenses. Unfortunately, there is no way to initialize ARCore in java and pass that initialization to Unity. There may be a way to initialize Unity in an Android application without rendering to the viewport but that is beyond the scope of what we can help you with here. Does that help?

rramprasad commented 6 years ago

@small-potatoes Yes ARScreen means ARCore unity camera background. I already removed splashscreen with Unity plus license,but still it shows some black screen.You said,there may be a way to initialize unity in Android without rendering.But Unity gradle build gives exported project,not any loading parameters.Is it anything you know about loading Unity engine in background in Android app startup?

pablisho commented 6 years ago

Hi @rramprasad I think you'll find better support for non-ARCore specific issues in Unity forum and answers.

rramprasad commented 6 years ago

Hi @pablisho no problem,I discontinued using Unity and using Sceneform SDK.This is best way to avoid unity dependencies.