Hi I’ve seen a few discussions with people having the same issue of having a null reference exception when implementing:
if (InteractWithUI()){ return; }
private bool InteractWithUI()
{
return EventSystem.current.IsPointerOverGameObject();
}
Such as in:
but I don’t understand the solution suggested, I also don’t fully understand what this code is even doing.
Can someone please break down what this code is doing and what is causing this exception including how to fix it.