Question by
VICZSOS · Jan 05 at 10:31 AM ·
uiinstantiatescriptableobject
Can't drag objects into button prefabs to enable OnClick()
I know to enable OnClick() functions I need to drag the object that has the script attached to rather than the script itself into the slot. However, whatever I do, Unity just doesn't let me do it.
Why can't I?
FYI, the buttons are prefabs. I can attach the script to the button prefab and drag the prefab into the slot, but I'm not sure if that's the correct way to do it.
Besides, this is for a text adventure game. So whenever the player chooses an option, it destroys all the other options and instantiate a new set of options according to the scriptable objects that store the dialogue information.
Comment