So I have a prefab which containcs another prefab with a group of buttons. So in one of the buttons I want to attach on the onClick enviroment a gameObject which is in my scene to get its scripts and finally its methods. I can attach just the script but I cannot find the methods of it(They are public). I can't look into the prefab and at the same time at the game object so that I drag and attach into the onClick button. When I click one the other disappears. Any suggestions?
Here is the picture of the prefab that containts the prefab of the group of buttons. Which has the UI Script (that I dragged and dropped) but doesnt have its functions(Public).
And here is the Canvas(Game object) which has the Script on it (UIManager) that I want the button to get its methods from. But when I click to canvas the prefab dissapears so I cant drag and drop it.
Thank you...
MainMenu
prefab using the lock icon in the upper right corner of the inspector tab. Then you can drag the canvas without the prefab disappearing. Still, I don't think you can attach a scene object to a prefab script. – Saeleas