Phaser API Documentation



Removes a Texture from the Texture Manager and destroys it. This will immediately clear all references to it from the Texture Manager, and if it has one, destroy its WebGLTexture. This will emit a removetexture event.

Note: If you have any Game Objects still using this texture they will start throwing errors the next time they try to render. Make sure that removing the texture is the final step when clearing down to avoid this.


name type description
key string | Phaser.Textures.Texture

The key of the Texture to remove, or a reference to it.


The Texture Manager.

Since: 3.7.0