Hi,
I’d like to know if a GameObject that is a UI Element (Button for example) in a screen space canvas is visible on screen or not.
Checking activeself is not good enough because if the element is active but has an inactive parent, it won’t be visible.
I’ve been googling away for an hour without success. Should I check if all its parents are active ? That can be costly…
Can you kindly help ?
Thanks
Are you looking for GameObject.activeInHierarchy ?
1 Like
Yes sir, thank you sir