Assigning button On Click() with a prefab
Hi everyone, I'm a new Unity learner so sorry if this is a silly question. So today while playing around with buttons I tried assigning a prefab to a button OnClick() event in the inspector, instead of a scene object. The Unity manual says that we have to select a UnityEngine.Object to receive the event callback. I did not create any scene object from the prefab but the button still WORKED as normal which is quite unexpected to me. So can anyone please explain to me the difference between assigning a prefab vs a scene object to button On Click()? Is it a good or bad practice in Unity? Thanks in advance.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612035420im_/https://answers.unity.com/themes/thub/images/avi.jpg)