☑ How to change the scene skybox

Thanks for sharing simple project that helps to replicate issue - it does really helps.

So the problem here is lack of good documentation and inconsistencies around places.
Looks like we need a new method on pc.Application to simplify setting skybox.

Here is code of onClick method, that sets skybox as supposed to.

if (this.app.scene.skyboxMip === 0) {
    this.cubemap.loadFaces = true;
    this.app.assets.load(this.cubemap);
}

this.app.scene.setSkybox(this.cubemap.resources);

I’ve added an engine ticket for that as well: https://github.com/playcanvas/engine/issues/768

3 Likes