Unity contains a bug wherein isActiveAndEnabled can be false even though both enabled and gameObject.activeSelf are true. isActiveAndEnabled is largely a convenience and by checking enabled and gameObject.activeInHierarchy this issue is avoided while remaining functionally identical.
This change was designed by @bddckr and discussed on Slack. I have tested the change and confirmed it indeed works around the Unity issue.
Unity contains a bug wherein
isActiveAndEnabled
can befalse
even though bothenabled
andgameObject.activeSelf
aretrue
.isActiveAndEnabled
is largely a convenience and by checkingenabled
andgameObject.activeInHierarchy
this issue is avoided while remaining functionally identical.This change was designed by @bddckr and discussed on Slack. I have tested the change and confirmed it indeed works around the Unity issue.