A little async wrapper like below could be useful if you’d rather use await instead of the callback. Also scene.whenReadyAsync seems to be working in your PG (the textures are serialized in the materials that use them).
BABYLON.Texture.WhenAllReadyAsync = function (textures) {
return new Promise(function (resolve) {
BABYLON.Texture.WhenAllReady(textures, resolve);
});
};
Thanks. Yes, a wrapper like this would work well, perhaps with onError/rejection handling. Although I feel it is early in the personal project, it may already time to extend existing functionality like this. Sofar I was trying to rely as much as possible on BJS itself.
Thanks for checking back. I think I ended up using scene.whenReadyAsync. I had to pivot a bit and hope to get back to that project rather sooner than later. Let me assign Blakes response as a solution to mark the question answered.