awbummer Posted October 24, 2018 Share Posted October 24, 2018 The following... const testGroup = this.add.group("test"); const testGroup2 = this.add.group("test2"); testGroup.add(testGroup2); ...produces this error... Uncaught (in promise) TypeError: child.on is not a function Something I'm missing? Thanks! Link to comment Share on other sites More sharing options...
kurhlaa Posted October 24, 2018 Share Posted October 24, 2018 According to the source code - function group.add() expects GameObject as param only, not groups or anything else. child.on tries to add an event listener for the GameObject, and probably there is no such functionality for the groups samme and awbummer 2 Link to comment Share on other sites More sharing options...
samme Posted October 24, 2018 Share Posted October 24, 2018 I don't think Groups are intended to be nested (maybe you want Containers?). awbummer 1 Link to comment Share on other sites More sharing options...
awbummer Posted October 24, 2018 Author Share Posted October 24, 2018 Thank you @samme and @kurhlaa. I'm researching containers now. Link to comment Share on other sites More sharing options...
Recommended Posts