Home Game Development unity – How do I take a scene-object popup window, and use cases of a prefab button to provoke it?

unity – How do I take a scene-object popup window, and use cases of a prefab button to provoke it?

0
unity – How do I take a scene-object popup window, and use cases of a prefab button to provoke it?

[ad_1]

I’ve a button that invokes a modal window (a market transaction). Using the inspector onclick, I’ve efficiently setup in order that 1 of the 9 buttons will pop the window (GameObject.SetActive ✅), after which the Done button within the window will shut it (🟩).

However there are 9 of those buttons, they usually use a prefab for his or her design.

Here’s a pic of the hierarchy with the button occasion highlighted:

enter image description here

Each rowItem is the very same (from a rowItem prefab). Also, every row has knowledge that must be handed into the modal. An index would in all probability be sufficient.

How do I setup the prefab in order that the 9 instanced buttons invoke the popup and move the information?

I’m a JS webdev by day, so I usually perceive the ideas. I’m simply beginner on the syntax and the place every little thing is in Unity.

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here