google-ar / sceneform-android-sdk

Sceneform SDK for Android
https://developers.google.com/sceneform/develop/
Apache License 2.0
1.23k stars 604 forks source link

Download multiple assets at once? #470

Open yashvv opened 5 years ago

yashvv commented 5 years ago

I'm trying to build a scene with multiple assets. There is a way to download one asset at a time now. But is there a way to download all the assets at once prior to building the scene to prevent lag for the user? If I include the all the assets, textures and normal maps it is blowing up the app size.

claywilkinson commented 5 years ago

The ModelRenderable.Builder builds the assets asynchronously. You can call build() on multiple builders then wait for them all to complete (or handle them progressively showing up).

The Solar System sample does this for local assets, but you can do the same approach and use the RenderableSource to load the assets from the cloud. See Loading renderables at Runtime for more details.