Tuesday, September 6, 2022
HomeGame Developmentunity - How do I take a scene-object popup window, and use...

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


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

Nevertheless there are 9 of those buttons, and so they use a prefab for his or her design.

This is a pic of the heirarchy with the button occasion hilited. Every rowItem is the very same (from a rowItem prefab). Additionally, every row has information 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 go the information?

I am a JS webdev by day, so I typically perceive the ideas. I am simply beginner on the syntax and the place the whole lot is in Unity.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments