We are using an Asset Container to add our assets to a base scene. We show a loading screen when we start and dismiss it when the LoadAssetContainerAsync resolves, right after we call addAllToScene. It seems that addAllToScene is asynchronous and our loading screen is dismissed before the assets appear in scene. It doesn’t look like AssetContainer returns a promise or accepts a callback. My question is how can I execute code when the assets have been added? If there is no explicit callback, is there a way to detect when the assets have been loaded. Or when there are any visible assets in the scene?
Welcome to the forum,
AddAllToScene is synchronous so it should be all good. What kind of delay are you experiencing ?
Might it be shader compilation related ?
Would be amazing if you could make a tiny repro in the playground ?
You are right. I confirmed the issue is not that the asset container merge is async, it is that our environment loader (using AssetManager) is hiding the ui before we explicitly hide it. I’ll open a new topic for that issue