Words in my script don't turn blue, why not? (absolute script noob)
Hello everybody,
Let's assume I don't know jack about scripting (which is true). I'm doing this tutorial from the Unity site on procedural cave generation, but several of the words that my all-knowing instructor is typing into his script (at the speed of light, I might add) turn blue for him, but not for me.
The video: http://unity3d.com/learn/tutorials/modules/advanced/scripting/procedural-cave-generation-pt1?playlist=17153 The code up to where I managed to get to can be found at 3:08.
For example, the words "width", "height", "randomFillPercent" and "map" all just stay black for me when I type them. I know that blue words are keywords that do something (?), and I'm pretty sure the fact that they don't turn blue for me is going to be a problem.
Any suggestions would be greatly appreciated, as I would very much like to get better at this.
Thanks in advance!
The color theme? Are you sure this a problem? Try it first then ask a question if you have a problem.
Answer by seevenup · Feb 10, 2016 at 06:41 PM
Im a noob to, but i guess u need to post your code. but when width and height dont change the color you did not set the variable (at the top of his code)
public int width;
public int height;
when this is done you should be able to type the width and it will change it's color
or save your script i think then it checks the variable and will change it's color
Answer by meat5000 · Feb 10, 2016 at 06:52 PM
Which program do you use to edit your scripts? Notepad-standard doesnt do KeyWord highlights.
If you find that (in Mono or VS) Keyword highlighting is broken, the chances are you have incorrectly set up your .cs or .js file and as such, is not being recognised as being a file in that language. In this situation for all intents and purposes it may as well be Twice Derived XML Alien Edition.
If all else fails, just check the prefs in Mono/VS/Notepad++.
I use Notepad++ because I live Vanilla. You must remember to select the correct language from the menus.
Answer by RiverKidFiction · Feb 11, 2016 at 05:25 PM
@meat5000 Thanks! I was working in Mono and you were right:it was the syntax highlighting that was the problem. Next time it should at least fail for a different reason~
Your answer
Follow this Question
Related Questions
Scripting help? 2 Answers
How to add information to an instantiated object 0 Answers
The type or namespace function could not be found 1 Answer