I have created weapons in my game and I made weapons not be active when it is taken but now Player can take 2 guns at the same time. I have added all my weapons to an empty object and I want to check if any child of object is active. All of the weapons have same script but but values of booleans are different. method is like that
void OnMouseDown()
{
if(weapon_is_taken == false)
{
weapon_is_taken = true;
}
}
question from:https://stackoverflow.com/questions/66058697/how-to-check-if-any-child-of-an-object-is-active