- Home /
Question by
AA-A3 · Oct 27, 2021 at 11:04 AM ·
prefabeventeventsevent-listenereventlistener
Make prefab that generated more than once listener in Unity Events
Hello, I have a script that contains Unity Event and I want the method that inside the prefab to be the listener, it worked, but the problem is that in some cases this prefab is generated to the scene more than once and this makes the listener only one of them.
more details: My problem is that the prefab has been generated more than once in the scene, but the script in the scene executes the event if the screen is touched, and the script in the prefab I selected a method from it and made it a listener by making the UnityEvent public, then dragging the prefab and choosing the method. What I encountered is that one Gemaobject of the generated that do the event command
What is the solution, thank you
Comment