I’m trying to activate and deactivate an object from an animation, but using an animation event.
I used transform.Find(“ObjectName”).gameObject to access the child, but when I call object.SetActive(false) nothing happens.
SetActive does’t work in the Update() method neither.
The object is disabled by default.
I also tried to reference the object from the inspector (the object not the prefab).
The object is a child in a prefab
I think this is the wrong section.
I managed to solve the problem, I don’t know but animating SetActive in an animation and using a function to call SetActive in another created a conflict