How to save an AdvancedDynamicTexture to file

I would like to save an advancedDynamicTexture as an image to the user’s machine.

After reading this post on the forums I attempted to use the same logic. My result can be seen on the following playground:

However, the image that it returns is always empty…
I think I need to wait for a trigger to let me know when the dynamic texture is ready, but I’m not sure what that trigger is…

Thanks for any help

1 Like

cc @carolhmj to find the best event to place your read code in :slight_smile:

You can check for isReady (for the texture itself) and guiIsReady (for the controls): Simple GUI in fullscreen mode | Babylon.js Playground (