Sorry if this has been asked-answered before. I wasn’t able to find the right solution yet.
I have a list of images in the screen Canvas. Each image is a slot of a sort of inventory and they have a script attached that implements IPointerClickHandler.
I have a player gameobject with a script which in the “Update” evaluates if Input.GetButtonMouseDown() was triggered to move or attack the player to the point of the terrain clicked.
When I click on one of the images with the script that implements IPointerClickHandler, the script of the player is also triggered, so the player moves, which I don’t want to happen.
How can I avoid the Input.GetButtonMouseDown() from getting triggered?
I read somewhere about CanvasGroup. Not sure if it is the solution for this, but I tried it with no luck.