Game Development Reference
In-Depth Information
Expand Advanced Settings to reveal a large number of properties available to you for customizing
the behavior for your particular character.
If you click the topic icon to access the reference, the Scripting Reference opens up with the
MonoBehavior parent class description. The Scripting Reference contains information about the
classes and functions used in scripting rather than the contents of any particular script. Even with
the addition of a new function, the reference documentation might not reflect the new content from a
beta version because it is still subject to change.
This is a great example of the importance of developing good habits with naming conventions
and documenting your scripts with comments as you go. The properties listed in the Inspector are
descriptively named, so you can take a pretty good guess at what they do. If you open the script
itself, you will find that the Unity team did an outstanding job breaking down the script variables and
functions with extensively detailed comments (Figure 6-17 ).
Figure 6-17. Extensive documentation within the ThirdPersonCharacter script
In the Project panel, find the Smash Boxes Platform in the Sample Assets ➤ Prototyping ➤ Prefabs
➤ Compound Prefabs folder. Drag a Smash Boxes Platform into your scene.
Move your SpawnPoint01 game object to get your character onto the Smash Boxes Platform, then
try to jump to the top of the stack. Try making more spawn points and triggers. Reposition the
SpawnPoint01 game object on top of the platform in front of the boxes.
Save the scene and play to get your character up on the platform to check out some additional
behaviors. If you try to walk your character into the spaces between the boxes, you'll find that it
automatically crouches to move through the small space. If you walk your character into a box,
unlike the static platform these white boxes will respond to collisions with your player character. See
if you can get your character to the top of the stack of boxes without knocking it over. Good luck!
 
Search WWH ::




Custom Search