Language

Check for Same Image

I am trying to create a mini game where the player must press a button (in a grid of buttons) that matches the image given by the program (randomly generated from a list of possible prefab buttons). How would I check that the images are the same?

One of the most general questions I've seen on UA. Just keep the name of the image in the button or something. Or keep a list of images, instantiate your buttons based on that list, and then pick a random image from the list to show to the player. Then just compare indexes...there are a lot of possibilities, depending on the details, of which, you've given almost none.