Jump to content

Get container by name


Marine
 Share

Recommended Posts

9 hours ago, iKest said:

Phaser does track Game Objects by name with getByName(...) or getAll('name', ...) methods

I'm getting null when typing this.container.getByName('3') .
inside my containers there is an image and this ->  this.container.getByName()  return my Image which does not have name. I think thats because i gave null. But i want to return not the Image but Container  

 
Link to comment
Share on other sites

8 hours ago, samme said:

Well, it doesn't track them, but it can search them.


Phaser.Actions.GetFirst(containers, { name: 'Container1' });

 

Im getting error this way too. 

My code is -> 

Phaser.Actions.GetFirst(this.squareContainer, { name: '1' })

Screen Shot 2018-09-21 at 10.04.08 AM.png

Link to comment
Share on other sites

  • 2 months later...
 Share

  • Recently Browsing   0 members

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