Probably a noob question and easy fix, but I could not work it out-- I’m working on an attack animation (2D), and the area that deals damage is a box collider attached to a child of the player sprite. I would like to add a property that enables/disables said damage collider for different frames, but I can’t seem to add a “enable/disable” property for the child collider. Every time I try, it just adds an enable/disable property for the collider of the player sprite (and not the child). I’m either missing a button, or there’s a better way to get this done.
The example code is as:
public void yourFunction()
transform.GetChild(0).gameObject.GetComponent().enabled = true or false
Call this function in animation event.