When doing states of something, should I have checks within built events or outside?
For example, using:
public void OnPointerEnter(PointerEventData eventData)
Should I have a check in there like if(someStateCheck != true){ //don't continue the function}
or, should I have it elsewhere and customize something similar to OnPointerEnter that doesn't fire unless the check is valid.
Basically - how heavy are events that might constantly check a condition? If I have a grid game where during selection, the tile has an OnPointerEvent (so that I can select units on the grid) - but when the state of play changes to watching units move, act, etc... I don't want that event to consider the pointer being over it, right? Should I turn off the Physics Raycaster on the camera in this case during the action phase? Does it matter?
