I’m animating a character with multiple child objects inside it (various body parts) and I want to use a single boolean in the parent (hit) to make 4 of the child objects change animation states when the character is damaged. Do I have to have scripts on every single child object to access the variable in the parent GameObject?
Essentially, each script would be exactly the same-
void Update () {
if (parent.Hit)
Hit= true; //To set child's animator boolean
}
There must be a better way instead of having the exact same script 4 times on each child object.