I have random amount of chests in my scene and script for them is working fine but i want to use UI button to open the chest and simply putting chest prefab in “On Click()” isn’t working and i need a little help with that. How i can make the button work on every chest prefab in scene automatically?
Are you saying that you have a button inside the prefab that you need to connect to some external object, or that you have an external button that needs to detect which copy of the prefab is in front of you?
1 Like
External button that needs to detect which copy of prefab is in front of me
thank you for writing “button inside prefab”, this is working exactly the way i need it