Hi
I have made prefab object called “item_19_Plasma” and it has several objects as children
(I hope you see this picture)
and this is the part of script attached on “item_19_Plasma” (attached on PARENT)
public void Plasma ()
{
if (!Opened)
{
gameObject.active = false;
}
else
{
gameObject.active = true;
}
Opened = !Opened;
}
I want to ACTIVATE or DEACTIVATE whole OBJECT including CHILDREN with this function.
atm this code is activating only the parent, I don’t know what should I add in that code so I can TALK TO CHILDREN
like “CHILD1.activate = false;” and so on.
I have looked at help file; searched for “GameObject” but I didn’t understood how to get children gameobjects out from the parent