Assigning multiple buttons with different functions to a game object

Hi!

So I’m creating a 2D board game (7 Wonders) in Unity and have a small issue with playing/discarding cards. I have a deck of cards in a players hand and I want to make a hover over script, which moves the card upwards and enables 3 buttons below it. (One for playing the card, one for discarding and one for an other function.)
My problem is, how do I tell the buttons to activate themselves in the right position on the canvas (below the card I hover over) and how will they know which card to place (so kinda how to “connect” them?)
The cards are located in a Player class’ 7 long List<> and obviously this list will decrease in time as we play the cards. I imagine that they will be placed in an other Player’s List<> (playedCards or something like this).
I hope I was clear and you get the idea. Thanks in advance!

  1. " I have a deck of cards in a
    players hand and I want to make a
    hover over script, which moves the
    card upwards and enables 3 buttons
    below it"

you can use the event system pointer
to get what UI object your mouse is
on and and in a script "highlight"
the card, you can as well use a ray
cast depending on your approach.

  1. “how do I tell the buttons to
    activate themselves in the right
    position on the canvas”

I'm not sure what do you mean by
that

  1. “and how will they know which card
    to place”

As most of the time your only
options are : LayerMask, Tag, Name,
ChildIndex, scripts that hold the
data you need inside the UI object,
or assigned events to each button on
the card.