Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to reference a non-prefab onto a prefab?

I have a script on an object that takes the value from an input field and the stores it. I tried to make it so that my player prefab could access that variable, so I created a reference :

public GameObject buttonManager;

But it won't allow me to drag in the Button Manager. Is there a way around this?


  • I am assuming the button manager is just a script? The you can e.g. make it static and just call it from any script, in case this makes sense architecture wise, else I would recommend you double check whether or not the script buttonManager is hooked up to a game object and you can assign it properly. However, it might be helpful to get some background on what you are having as a setup currently.

Sign In or Register to comment.