Hi, I’m making a project, where I want Europe map and I want to click exactly on one country, so I can’t create each country as a button. I’ve tried making image with collider with function OnMouseDown, but it interacts only when the collider is bigger than canvas.I’ve tried creating empty object on position where mouse clicked and set the collider as a trigger, where I’ve call function OnTriggerEnter, but it won’t work too.
Try to use
button.onClick.AddListener(() -> MyMethod())
… and maybe just add cube as collider behind to UI without render component.