- Home /
active inactive gameobject child
hi, so i have this gameobject pool manager script that loop all my instantiate enemy and check if i need it in screen and find inactive one then it will active that enemy, the problem is there is my enemy prefabs that have this hierarcy
emptygameobject (just a place holder so i can instantiate 3 cube together) -cube (have its own health,collider and movement) -cube (have its own health,collider and movement) -cube (have its own health,collider and movement)
and when what i attack is cube and what is getting inactive is the cube but emptygameobject remain active and my gameobject pool manager will always instantiate new enemy which will make my code pointless...
so is there any way to put a script that check if emptygameobject child all inactive then it will inactive it self so it will getting back into my gameobject pool manager loop
Your answer
Follow this Question
Related Questions
2D Platformer Mouse aiming! 0 Answers
Images won't import as sprites? 1 Answer
Script gives wrong rotation. 1 Answer
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
2D Player Movement 1 Answer