Scope question - how do you load an invisible asset and gain access to it anywhere?

Daft novice question…if you want to load a glb mesh, and not have it seen until needed, what methods can you use. I am particularly interested in any method that allows you to load your glb mesh, without it being seen, then being able to access and show it at any point in your code.

I am aware of this code below. Am I right in saying to access the model the access code needs to be inside the curly brackets? You couldn’t access the model outside them? Can ‘container’ be made global?

BABYLON.SceneLoader.LoadAssetContainer("", “yourModel.glb”, scene, function(container) {
//do something with ‘container’
});

Yes, the function is called when the assets have been loaded. You can reuse container somewhere else in your code by setting a global variable with this value, but you must make sure not to access this global variable before the callback function has been executed.

You can also use the Async version of the LoadAssetContainer:

const container = await BABYLON.SceneLoader.LoadAssetContainerAsync("",
                "yourModel.glb", scene);

For this to work, the function that contains this line must be marked as async:

async function myFunc() {
    ...
    const container = await BABYLON.SceneLoader.LoadAssetContainerAsync("",
                "yourModel.glb", scene);
    ...
}

Thank you Evgeni_Popov…well explained.
Cheers.