Question regarding Buttons
Hello, I'm still new to Unity, so this is going to be just a basic question. I'm currently making a Big 2 Game. In the game, the player is able to click cards that are displayed on the screen before clicking another button to place the cards in the middle of the screen. Each card is a GameObject that is already instantiated.
For cards on player's hand, I put them in a list like this:
private List<GameObject> player1Hand = new List<GameObject>();
Is there a way to make cards in that list to become a button? And should I use GameObject > UI > Button or OnGUI() method to create the button to place the cards?
Are you dependent on using the Cards in a UI context? Wondering if just adding a simple "On$$anonymous$$ouseDown" function (or prefab AddComponent to deliver that) would suffice.
Your answer
Follow this Question
Related Questions
Several objects, same script, different values with no duplications 1 Answer
How can I check value stored in a list when pressing button with the same name? 2 Answers
UI buttons activate movement functions for one time only 1 Answer
NullReferenceException : Object reference not set to an instance of an object? 0 Answers