September 2011
Beginner
408 pages
9h 52m
English
Double-click on the clockScript. Your empty script, with one lone Update() function, should appear in the code editor. The very first thing we should consider is doing away with our puce background by changing the GUIText color to black instead of white. Let's get at it.
Awake function and change the GUIText color:function Awake() { guiText.material.color = Color.black; } function Update() { }
Awake is a built-in function just like Start, but it happens even earlier. Awake is the first function that gets called when our script runs. This is Unity's default behavior, but there are knobs you can twist to change ...
Read now
Unlock full access