I have a problem with my buttons in the editor mode. To contextualize, I am working on a world exploring application and my buttons are in fact the text above the points of interest, so they are moving on the screen as the camera moves. But the fact is that when my buttons are on the edges of the screen, they work well. I think there is a kind of “working area” (see image bellow). Moreover, I don’t encounter this issue with the executable of the app.
Also, here is the configuration of my EventSystem:
EventSystem inspector
What I want is to make it working in the Unity editor when I hit play button, even in the “not working area”.
One last thing, I am using Unity 2018.2.7f1
My canvas is set to Screen Space - Overlay. I have tried to set it to World Space an added my camera as you said in your post, but when I do that, my button disappears (I mean, it is not destroyed or disabled, but is not visible on screen anymore).
In my EventSystem, when I hover the button in the “Working area” I got this :
pointerEnter: Text (UnityEngine.GameObject)
And in the “Unworking area”:
pointerEnter: Pointer (UnityEngine.GameObject)
Finally, yes, I added a listener to my button in my Start() function. In fact, I added two listeners, and is working the same way as only one.
Yes, it was my PointergameObject which was intercepting my mouse event. Fyi, it is a kind of sight (a “+” in a text field) designed to reduce motion sickness.