I have a door model which has three parts - door, frame, button. I have a script attached to the button so that when it’s pressed, the state of the door is checked and the appropriate animation needs to play - i.e. door opening or door closing.
Can anyone tell me how to address the button’s parent object?
e.g.
gameObject.parent.animation.Play(“opening”)