In this part of the lecture, Ben describes how to make your first script. He asks that we put in the print command with “Welcome to Number Wizard” as the string.
Please do note that I may have missed something in his lecture thus far, but I don’t believe I did.
When he tells us to run the script, my experience is that he hadn’t told us to make the connection in the Inspector to the script, therefore when I first clicked Play, my console did nothing. I found the solution to that here, and made the connection the script.
Then I did what he asked next: add another print command that says “Pick a number in your head, but don’t tell me.” When I did that and saved the script again, it deleted the connection to the script from the Inspector tab in Unity.
Is this normal behavior, or do I have something wrong? I’d assume it would keep the connection.
Edit: It appears I ran in to a bug in Unity, perhaps. If I follow the same course of action now, the connection stays and the script prints to the console just as Ben describes it. Does anyone know if this is common or am I just having a bad night?
Edit2: Continuing with the course… I’ve added the int max variable as he describes and saved the script and it removed the connection to the script again. I had to reconnect to the script in the Inspector once more and it works fine now, thus confirming this doesn’t happen every time I save my script. This is appearing to happen regularly, however. Saving the script 5 times has produced 3 times that I have to Add Component in the Inspector again.
Any ideas?
Thanks.