Reputation: 43
I just started exploring Unity and I'm making a game in UNITY 2D. I decided to start with a simple menu screen to get used to UNITY. I made the menu and moved on to programming the buttons.
However when I drag the script (or the game object holding the script) in to the button on click section and try and select my function it does not show up.
Manager in the button on click script.
My code in C# (this is my first time using c#)
what I want to know is: have I done something wrong; doe unity work differently to how I understand it; is unity doing something weird; how do I fix it.
(appologies for the weird post layout I don't know why it did that).
Upvotes: 0
Views: 2293
Reputation:
You need to :
Upvotes: 1
Reputation: 1909
Just insert a ;
at the end of your code and you should be fine. You should notice that the compiler is complaining about the missing semicolon. Also, make sure to attach your script to the _Manager
GameObject.
Upvotes: 1