Heya. i’ve had this bug for a while, but hoped that it would get fixed in a lecture, but now im at the end and its still here, so im asking for help. my code is all the basic stuff from the Glitch Garden chapter. I have tried implementing “PlayOneShot” for the sound bit, but i couldnt get that to work either… (this is my first unity course, so still finding this hard to understand sometimes) ive recorded the behavior and taken a screenshot of the script, where i think the problem might reside.
Please note, it’s better to copy/paste your code and apply the code fencing characters, rather than using screenshots. Screenshots are ideal for displaying specific details from within a game engine editor or even error messages, but for code, they tend to be less readable, especially on mobile devices which can require extensive zooming and scrolling.
You also prevent those that may offer to help you the ability to copy/paste part of your code back to you with suggestions and/or corrections, meaning that they would need to type a potentially lengthy response. You will often find that people are more likely to respond to your questions if you make it as easy as possible for them to do so.
it wasn’t turned on
ive looked through all the code from github, and all my code match Rick’s code on github. so the difference might be in the unity settings somewhere… im running “Unity 2019.1.7f1 (64-bit)” and ive downloaded the entire repo, and installed the version Rick used, to see whats different but i just cant figure it out… guess ill move on for now, and maybe return to redo this project at some point…
I took another look at the code and I have two more suggestions the first would be to put win/loseLabel.setactive, into the awake method instead of start.
Second would be to set them as false in the inspector itself, at the very top of the inspector you’ll see a checkbox where you can turn it off at the beginning.
Hopefully one of those works.
Edit: I guess thats only one since they both do the same thing.