Fetching Needle Engine assets from an S3 bucket

Hi, is it feasible to load assets from the cloud instead of bundling them into the build?

What I mean is, I have a React project using Needle Engine. When the user accesses a certain part of the app, we load the Needle Engine scene. The assets (GLB files with SceneSwitcher and other scripts) are stored in an S3 bucket.

Can we fetch and load those assets dynamically based on the user’s selection? For example, if we have around 20–30 models and related assets, including all of them in the build makes the build size huge. So instead, I’d like to load only the assets the user selects.

I know changing the src of the Needle Engine component can achieve this for simple cases, but with SceneSwitcher and multiple scenes, is this approach still feasible? Or is there a better way to handle this?
Image: this is how the assets look for a single model

Yeah, this is totally feasible. The recommended way is to use the Needle Cloud Asset component — it loads assets at runtime so you don’t bundle them in the build. It supports progressive loading, which saves ~90% bandwidth, and works with SceneSwitcher and multiple scenes. Just store your GLBs in S3 and feed the URLs to that component (or use direct links for progressive/optimized variants). You can switch scenes dynamically based on user selection without bloating the initial build. See [context [1]] for more on cloud asset usage and sharing.

Sources: Needle Engine Docs (75%)

4 replies left
Reply to this post directly if you need further help (bottom right button)