- Home /
Load animated 3D object from streamingassets?
I am making a webgl app and I want to stream in 3D animations as they are needed only.
But is this possible? It looks like Unity wants to preprocess all animations and include them into the build, rather than have you load them separately. This makes the build too bulky for webgl in my case.
Can animated 3D objects be loaded from streamingassets on demand instead?
Answer by Pangamini · Feb 17, 2020 at 12:41 AM
It can be done, but perhaps it's not what you are looking for StreamingAssets just copies files 'as is' into your build folder. You'd have to read a streamingAsset file and assemble the AnimationClip object by your own code, from the data you find in there. I am not entirely sure how streamingAssets work in the webGL build though.. but Perhaps what you are looking for are AssetBundles. It allows you to build assets into a separate file which can be streamed on demand. AssetBundles contain assets in a unity specific format, so you don't have to deal with anything, it just spits out the runtime asset representation.
Yes, you are right. I have mostly downloaded from strea$$anonymous$$gassets, but more complex assets than textures, binaries and text is probably better handled using assetsbundles...
Your answer
![](https://koobas.hobune.stream/wayback/20220612223450im_/https://answers.unity.com/themes/thub/images/avi.jpg)