Issue with loading scenes with buttons
Having some issue with loading scene with my buttons. I made a simple video on what i did and if anyone is lost. also i have a screenshot of my code too. Any help would be grateful!! thank you
https://www.youtube.com/watch?v=PpUQnKt56bY&feature=youtu.be
[1]: /storage/temp/167008-screenshot-23.png
Hey... I just watched your video... forgive me if you've already checked this, but have you added those other scenes into the Build Settings...
I am not seeing anything wrong with the way you have the buttons setup or the way you are passing a string... but I am far from an expert so I might be incorrect.
Yes i did add those to build settings. Thanks for checking for that! :)
Are you sure you have bound the
Btn$$anonymous$$anager
to theonClick
event of the buttons? (I have big doubts sinceprint
does not output in the console except for theGame
button, which printsHome
, not$$anonymous$$enu
, norGameScene
norLoad
Are you sure you have provided the correct strings in the parameter of this
Btn$$anonymous$$anager
in the inspector? (no extra space)
Answer by kingkill97 · Sep 07, 2020 at 09:48 PM
Omg!! i found it out after playing around with it! So, what i tried this this time, was removing the old OnClick in and did it normally and instead adding the scrip i added the prefab instead and it gave me the BtnString i needed!!! now it works for all three scenes!!
I cannot stress to anyone how hard it was for me to figure it out! ive been working on this for a few days! lol