Hi,
I'm having the same issue too, and I really try to figure out what to do, but I still cant make it work.
I have a button and and object over my button as you can see in my picture.
When I hover the button in the very right, outside of the object works (red line),
Inside the object (blue line), I'm not able to click, the click goes to the object.
I note when I hover the button in the very corner the button hover effects works, but not when is inside the blue line.
I tough this was something related with the Deph but is not since one is an game object and the other the ui (correct)?
I create a simple script for my button click event
using UnityEngine;
public class Menu : MonoBehaviour
{
private UIButton MyButton;
private void Awake()
{
MyButton = GameObject.Find("MyButton").GetComponent<UIButton>();
}
private void Start()
{
EventDelegate.Set(MyButton.onClick, delegate () { Test(); });
}
private void Test()
{
Debug.Log("test button action");
}
}
And one for my object:
using UnityEngine;
public class MyObject : MonoBehaviour
{
void OnPress(bool isPressed)
{
if (isPressed)
{
Debug.Log("my object click");
}
}
}
Anybody have any idea what is the problem?
Thanks