Hello Unity friends,
I have a class which uses UnityEvent as public property, so I can fit it using the Inspector, this UnityEvent points to another object which can be active or not active; when the target object is not active, I receive an error message saying I’m trying to Invoke a function in a non-active object, it’s cool!
but here is the question:
how can I do check when UnityEvent target gameObject is active or not active? This way, I can avoid calling it when the object is not active.
A clarification, I don’t have the gameObject reference, my only connection with him is the UnityEvent variable.