I have a button that invokes a modal window (a market transaction). Using the inspector
onclick, I have successfully setup so that 1 of the 9 buttons will pop the window (
GameObject.SetActive ✅), and then the Done button in the window will close it (
However there are 9 of these buttons, and they use a prefab for their design.
Here's a pic of the hierarchy with the button instance highlighted:
rowItem is the exact same (from a
rowItem prefab). Also, each row has data that needs to be passed into the modal. An index would probably be enough.
How do I setup the prefab so that the 9 instanced buttons invoke the popup and pass the data?
I'm a JS webdev by day, so I generally understand the concepts. I'm just newbie on the syntax and where everything is in Unity.