Unity 5.6: OnClick() not working... Still (Help Please, VERY frustrated)
13 hours ago, Minibois said:Can't watch the video currently so I'm just gonna suggest some things. Is that variable you want to set to 1 a public variable in the guy's script? Have you tried some log code to see if the button works at all?
After this I can suggest some more (but sorry, don't expect Swift answers from me)
5 hours ago, fpo said:You are loading a level.
Add the scenes to the build settings.
File build settings (or build. Not build and run) then select add active scenes and go to every scene and do that.
Hey! Thanks A BUNCH for your help! I also posted my question on the Unity Answers forum and I found the solution there:
https://forum.unity3d.com/threads/unity-5-6-onclick-not-working.468754/#post-3052263
All I had to do was add the script to a game object, then add that game object to the OnClick(). Thanks for your help anyway, thought, it's always nice to know people got your back.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now