Hey everyone, I’m adding a way to input custom assets into my game and reference them by key. The user is allowed to input their own custom key to reference the asset.
I need to make sure the custom key they input is unique. Is there any way to get all the keys currently loaded into phaser?
Right now, I am just checking every part where keys are loaded into phaser, but I want to be more rigourous in this check.
const game = window.game;
const keyExists =
!game ||
game.textures.exists(inputValue) ||
game.cache.audio.exists(inputValue) ||
game.anims.exists(inputValue);