onLoadErrorObservable for regular textures

Hi,

I was looking for a way to know if a regular texture fails to load for example because of an invalid path but I couldn’t find a solution.
I’ve seen that the BABYLON.PhotoDome method provides a onLoadErrorObservable to use in order to detect loading errors.
Is there a similar way to achieve this on a regular texture? Do you know why it is not implemented also for regular textures?

Thank a lot as usual :slight_smile:

Have you tried to use the onError parameter of the texture constructor?

1 Like

In addition to abovementioned onError parameter you may also check if the texture isReady - Texture | Babylon.js Documentation

1 Like

Thanks both of you, I looked at the reference 20 times but because the onError is not in the properties or methods lists I didn’t see it, sorry :slight_smile:
Also the isReady I didn’t notice and I did my own method to achieve the same…

Thanks a lot.

1 Like