I Need Help with this.
I have followed the video EXACTLY, but i am not getting anything in the console. Not even a 1.
I am running Unity 4.7.2
Code: https://pastebin.com/1vHaEbve
I noticed you don’t have a scene file saved… that one with the .unity
extension… See if that makes a difference. I’m thinking it may be
required to have that for the script to hook in to.
The .zip file project is a little different from your screenshots.
When I opened your project I double–clicked on the scene, the NumberWizard game object was displayed beneath that in the Hierarchy. Your screenshot isn’t displaying the scene above the game object, however, that may just be a difference between our versions of Unity, so lets not worry about that too much.
You have two script components on the NumberWizard game object, but both are missing the reference to the actual script.
As such, no code is being called when you run the game.
Thanks, Rob for the solution. And, thank you Dozeon for posting the question.
I had the “Display 1 No cameras rendering” happen as well with no output in the Console but, my error was due to an entirely different reason! I was busy watching Ben’s method of adding a script. I was shown a drag and drop method underneath “Add Component” in a precursor course I was taking and simply forgot to add my script! I need to pay better attention.
While it probably wasn’t necessary, since we were only concerned about the console output in this lesson, I fixed the “Display 1 No cameras rendering” that was being displayed when the game was started. I added a new Camera in the Hierarchy workspace and dragged it so it was under Main but above NumberWizard.
I am glad this question was posted and solutions offered, though the issue was different from my issue, I was able to spot the issue and I could fix my problem!
It happens a lot, you only have to search the forums to see, so spotting this now is great as it will mean, hopefully, it’s something you will remember going forwards
While it probably wasn’t necessary, since we were only concerned about the console output in this lesson, I fixed the “Display 1 No cameras rendering” that was being displayed when the game was started. I added a new Camera in the Hierarchy workspace and dragged it so it was under Main but above NumberWizard.
Fantastic! As you rightly stated, the camera wasn’t needed for the console output, but having it there in this case really doesn’t hurt and you resolved the error