{"action":"created","issue":{"url":"https://api.github.com/repos/photonstorm/phaser/issues/3418","repository_url":"https://api.github.com/repos/photonstorm/phaser","labels_url":"https://api.github.com/repos/photonstorm/phaser/issues/3418/labels{/name}","comments_url":"https://api.github.com/repos/photonstorm/phaser/issues/3418/comments","events_url":"https://api.github.com/repos/photonstorm/phaser/issues/3418/events","html_url":"https://github.com/photonstorm/phaser/issues/3418","id":306280380,"number":3418,"title":"Self destroyed gameobject keeped in Group","user":{"login":"hadikcz","id":7869116,"avatar_url":"https://avatars0.githubusercontent.com/u/7869116?v=4","gravatar_id":"","url":"https://api.github.com/users/hadikcz","html_url":"https://github.com/hadikcz","followers_url":"https://api.github.com/users/hadikcz/followers","following_url":"https://api.github.com/users/hadikcz/following{/other_user}","gists_url":"https://api.github.com/users/hadikcz/gists{/gist_id}","starred_url":"https://api.github.com/users/hadikcz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadikcz/subscriptions","organizations_url":"https://api.github.com/users/hadikcz/orgs","repos_url":"https://api.github.com/users/hadikcz/repos","events_url":"https://api.github.com/users/hadikcz/events{/privacy}","received_events_url":"https://api.github.com/users/hadikcz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-18T20:44:35Z","updated_at":"2018-03-18T22:10:06Z","closed_at":null,"author_association":"NONE","body":"When call `this.destroy()` in GameObject which is added in some group, this object is still in the group and require call `groupName.remove(gameObject, true /* removeFromScene  */);`\r\n\r\nI think this should be called automaticly when is `GameObject.destoy()` called ? Or it should be strict like this ?\r\n\r\n\r\nThis cause some diffucilty debug issues, like `each` function up on this group. When this removed GameObject try access to this.scene property, it will crashed asn `undefined` property\r\n\r\n\r\nThis is very nicely solved in Phaser CE in destroy compnent when child call `this.parent.remove(this)`\r\nhttps://github.com/photonstorm/phaser-ce/blob/29bc2b2d76f432a34fdb36ecc8ee634e0d8fdaf0/src/gameobjects/components/Destroy.js#L37-L56\r\n\r\n\r\nSo it should be somethink like this, here: https://github.com/photonstorm/phaser/blob/d1d8d4c4a2bbcbfbedd3151ce9f3055810de2b83/src/gameobjects/GameObject.js#L305-L369\r\n\r\nBut problem is, GameObject not have proprty like `parrent`.\r\n"},"comment":{"url":"https://api.github.com/repos/photonstorm/phaser/issues/comments/374055744","html_url":"https://github.com/photonstorm/phaser/issues/3418#issuecomment-374055744","issue_url":"https://api.github.com/repos/photonstorm/phaser/issues/3418","id":374055744,"user":{"login":"rexrainbow","id":817962,"avatar_url":"https://avatars3.githubusercontent.com/u/817962?v=4","gravatar_id":"","url":"https://api.github.com/users/rexrainbow","html_url":"https://github.com/rexrainbow","followers_url":"https://api.github.com/users/rexrainbow/followers","following_url":"https://api.github.com/users/rexrainbow/following{/other_user}","gists_url":"https://api.github.com/users/rexrainbow/gists{/gist_id}","starred_url":"https://api.github.com/users/rexrainbow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rexrainbow/subscriptions","organizations_url":"https://api.github.com/users/rexrainbow/orgs","repos_url":"https://api.github.com/users/rexrainbow/repos","events_url":"https://api.github.com/users/rexrainbow/events{/privacy}","received_events_url":"https://api.github.com/users/rexrainbow/received_events","type":"User","site_admin":false},"created_at":"2018-03-18T22:10:06Z","updated_at":"2018-03-18T22:10:06Z","author_association":"CONTRIBUTOR","body":"#3246 "}}
{"actor":{"display_login":"rexrainbow"}}