0

Okay so I have this unity project which consists of an Add Card button. With that button I can add more cards (the cards that are spawning are buttons) to the canvas. Now I want to make it so that each time you click on a card, each of them has a separate modal window that shows content about the card. Now I managed to make the modal window work for the first card that's already spawned but I have no idea how I can make it so that other cards that I spawn using the Add Card button also have their own modal window.

If someone could help me out I would appreciate it greatly.

Thanks

Ruzihm
  • 19,749
  • 5
  • 36
  • 48
  • Please provide enough code so others can better understand or reproduce the problem. – Community Apr 29 '22 at 17:44
  • 1
    If it works for the first card then why doesn't it work for the others? You want additional windows to open, or you have an error, or the data doesn't change, or something else? There's not a lot of description here on what's going wrong and there is zero code provided so it's really hard to provide useful feedback. – Chuck Apr 29 '22 at 18:29
  • Well, it works for the first one because the first one is already there, and doesn't need to be spawned. Now for the first one the modal window works because the card for it is spawned and in the hierarchy. I want every card that is spawned to have its own modal window and each modal window should be different. – Karlo Ciciliani Apr 30 '22 at 12:37
  • This question isn't about [tag:unityscript], it is about [tag:c#] – Ruzihm Jun 28 '22 at 20:26

0 Answers0