Phaser API Documentation

  Version: 
checkKey(key)

Description:

Checks the given texture key and throws a console.warn if the key is already in use, then returns false. If you wish to avoid the console.warn then use TextureManager.exists instead.

Parameters:

name type description
key string

The texture key to check.

Returns:
Description:

true if it's safe to use the texture key, otherwise false.

Type:
  • boolean
Since: 3.7.0