My team often faced bugs in our project, when someone forgets to pass scene to some constructor of babylon API with optional parameter, so we banned LastCreatedScene via
Object.defineProperty(EngineStore, "LastCreatedScene", {
get: function () {
throw new InvalidOperationError("Use EngineStore.LastCreatedScene is prohibited.");
},
});
(note, we create multiple scenes here and there)
We are making major update and updating our babylon dependency.
And app fails at CubeTexture.CreateFromPrefilteredData
, because at some point code executes EngineStore.LastCreatedScene?.offlineProvider
, even though we pass scene to CreateFromPrefilteredData
.
Any ideas how to make it smooth?