Hi,i gave up to this
Well what i wanted to do is : When i walk into trigger,it disabled player children (all) and enables different children and then after 5 seconds disables “different” children and again enables player children. Yeah,seems easy,but its not… I tried to do this,I think i should use gameObject.SetActiveRecursively(true); but how,can someone help me?
Is this the one u r asking for or something different…
Suppose,if the player has 2 children and the other object(Enemy) has 2 children.Make an empty gameobject and place the children of the player in that gameobject.Rename it as playerchildobject.
Similarly,do the same to enemyobjects.
Now ,if the player enters the trigger make the playerchildobjects to be deactive and sametime enemychildobjects to active .
yield WaitForSeconds(5);
playerchildobject active andenemychildobject to deactive.
I kept the attached file for reference .
1158301–44220–$Testing.zip (103 KB)