Game Development Reference
In-Depth Information
Custom Fonts
GUIText allows for the use of outside fonts. True to Unity's work flow
paradigm, fonts are considered just another asset, and thus are imported
by dropping them into the Unity project Assets folder. True Type Fonts work
great and are readily available all over the web. I'm using a font called Mom's
Typewriter that is easily found with a quick Google search. Find a font you like
and download it to your hard drive.
Step 5: Import your font. Do this in your OS and drag the downloaded (or
installed font) into the Assets folder of the Incursion-Unity project folder.
I placed my copy of the font in my 2D Assets folder.
Step 6: Use the font for GUITextHints. To do this, just select GUITextHints and
drag the font from the Project panel to the Font input field of the GUIText
component. The GUIText on screen will update to this new font ( Figure 13.3 ).
Figure 13.3 Updated font.
Step 7: Deactivate the GUIText component for GUITextHints (in the Inspector).
Why?
We don't want text always visible—only when prompted by triggers. Turning
it off here allows us to flip it back on via script when we want it there.
Creating Triggers
There's actually very little new information here. Creating triggers (in this
case) will be the process of creating and placing Cubes in the spots of the
game where we want screen hints to appear.
Step 8: Move the First Person Controller to approximate Figure 13.4 , as
though he has just come up over the mountain after being dropped off in
the vicinity.
Figure 13.4 Rough starting location
of the First Person Controller.
Search WWH ::




Custom Search