GetComponent returs inactive components

Hello,

I just spent some time debuging a script, the issue was that i had an inactive component on my gameobject that another component tried to access and then use. Is there a way to not match inactive components? A google search leads to how to do the opposite.

Thanks

No, but you can check if the component is active/enabled before accessing anything on it.

1 Like

Thanks, problem solved :slight_smile: