SkyBox Mipmap value change by code

I’ve set up scene level skybox and its mipmap value to 1.


So, the skybox reflection is vey clear.
BTW, the skybox texture resolution is 512.

Then, I’ve changed the scene level skybox to a different one.

Somehow, the reflection quality isn’t as good as before once after I change skybox via script.

Below is the code snipper to change environment (skybox) dynamically.; = curr.intensity; = 1; = curr.exposure;    

It seems like the mipmap is fixed while an asset is loaded. Is anyway to fix my problem?

You may need to load the cubemap faces manually as well.


    // Load the high quality faces
    this.skyboxAsset.loadFaces = true;
    this.skyboxAsset.ready((asset) => {; = 0;

If this doesn’t work, can you post simple repro project for us to look at please?

1 Like

What is ‘loadFaces’ set for? I didn’t search for this in the API documentation.I encountered some problems while setting up the Sky Box. I accidentally saw this method, which is very helpful for me to set up the Sky Box. I want to know what this is for

It’s a bit of legacy code in the engine. The cubemap asset itself, only contains the mipmap levels and the preflighted data.

So, it that is only loaded, the reflections only would show the mipmap levels. Having this flag and loading the cubemap again, will load the 6 face textures into the cubemap so they are used for reflections.