"environmentTexture" in "AssetContainer"

why “environmentTexture” is not written into “AssetContainer”?

            ...
            this._scene.environmentTexture = task.texture;
            ...
            var keepAssets = new KeepAssets();
            keepAssets.cameras.push(this.camera);
            this.containerSceneMain.moveAllFromScene(keepAssets);

screenshot

AssetContainer.prototype.moveAllFromScene = function (keepAssets) {
    this._wasAddedToScene = false;
    if (keepAssets === undefined) {
        keepAssets = new KeepAssets();
    }
    for (var key in this) {
        if (this.hasOwnProperty(key)) {
            this[key] = this[key] || (key === "environmentTexture" ? null : []); <--------- ???????????????
            this._moveAssets(this.scene[key], this[key], keepAssets[key]);
        }
    }
    this.removeAllFromScene();
};

That would require a tiny repro in the Playground but it smells like a bug

@Deltakosh, look please.

https://playground.babylonjs.com/#CGA05F#208

container after “container.moveAllFromScene(keepAssets);”

scene after “container.addAllToScene();”

Ok gotcha! Will be fix in next nightly

1 Like

@Deltakosh, thank you