Jump to content

Key not found in Cache.


ps786
 Share

Recommended Posts

    preload(){

       this.game.load.image('main_background', 'assets/images/gamemenu/background.png');
     }
    
    create(){

       this.background = this.game.add.sprite(0, 0, 'main_background');
}

 

i'm loading an image in preload function and using that as a background . but this gives me an error """"   Key "main_background" not found in Cache. ""

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...