#GetComponentInChildren checks itself

1 messages · Page 1 of 1 (latest)

idle grove
#

There's one object in the scene and it's colliders aren't disabling or his children. I've even tried passing the object through a direct reference like in the image. It's still not getting disabled

#

This was my other approach and it doesn't work either

neat plank
#

all of those things will work axcept GetComponentInChildren which will disable your own collider

#

assuming your code is actually running of course

#

YOu may be dragging and dropping the wrong object in

#

or something to that effect

idle grove
#

I hear you and I understand you but I can assure you that is not the case. There is only one object in the scene called HitBox and its the child of the only parent object that runs this script and it doesn't work.

neat plank
#

Oh you have an animator

#

that's likely an issue too

#

disable the animator for a minute

idle grove
#

Now it works and I'm extremly confused 🥲

neat plank
#

your animator is overriding everything

idle grove
#

Thank you for the help. This is new to me. The animation only has the Sprite in it though. How can this be happening?