Game Development Reference
In-Depth Information
9.
Take a minute to inspect the results.
The application name is TestBuild, but the title (as seen in the windowed title bar) is
MyFirstUnityApp, which you set in the Player Settings.
10.
Look in Windows Explorer (if you are on a PC) for the TestBuild application.
You will find TestBuild.exe and a folder called TestBuild_Data. When you distribute your games for
the PC desktop deployment, the .exe and the data folder must be in the same location.
The content for this topic was created using Windows. Other than a few keyboard differences, Unity
should look and act the same on whatever platform you are authoring on. It is easy to build for other
platforms.
1.
Close the running game, and return to the Unity editor.
2.
In the Build Settings dialog, change the Target Platform to Mac OS X (or
Windows if you are already on a Mac).
3.
After the changeover is complete, click Build.
4.
Save the new build in the same place as the first, with the same name.
The extension type will be different (.app), so there will be no conflicts. The Mac application is
contained in a single folder named TestBuild.app.
5.
If you have access to the other platform, feel free to test the new version.
6.
Back in the Unity editor, close the Build Settings dialog.
Summary
In this chapter, you added a First Person Controller into your terrain scene and were able to travel
around in it. You discovered that several script components that made up the First Person Controller
contained a lot of settings you could tweak to change the First Person Controller's behavior. You
found that various functionality, such as jumping and the ability to ride on moving platforms, was
optional. Moving platforms offered some interesting problems with regard to the height of the
platform and how the platform could interact with the First Person Controller.
During your experiments with the First Person Controller, you had an introduction to Unity's
InputManager. You were able to not only reassign input keys, but to create your own virtual keys to
expand an application's versatility. At the very end of the chapter, you got to see where the player
was allowed to change the key “mapping” before playing the game.
Having a means of traversing the scene, you got some firsthand experience with colliders. At some
point, you realized you were able to go through the terrain trees, and then you learned how to apply
colliders to assets used as terrain trees.
Moving on to physics, you experimented with the Rigidbody component and saw how it works
with the colliders to provide lots of non-key-framed animation in your scene. You found that any of
its position or rotation axes could be “frozen” to restrict the physics-based reactions. The Physic
Material in the collider component gave you a means of tailoring the object's reactions according to
a virtual material assignment. You found that you could add a Constant Force component to move
 
Search WWH ::




Custom Search