-
Book Overview & Buying
-
Table Of Contents
Unity Android Game Development by Example Beginner's Guide
By :
We are going to start by creating an object that will point at targets. We will be making a prefab that can be used repeatedly. However, you will need a model for the player to see. We will use a pie-slice type mesh. The size isn't particularly important; we will be adjusting the scale later. Let's perform the following steps to create the pointer:
Once you have created and imported your mesh, add it to the scene.
Create an empty GameObject and rename it to IndicatorSlice.
Make your mesh a child of IndicatorSlice and position it so that it points along the GameObject's z axis. IndicatorSlice will be centered in our indicator. Each slice that is created will have its z axis pointing in the direction of a target.

Now, we need to create a new script that will control our indicator. Create a new script called TargetIndicator in the Project window.
We start this script off with a pair of variables. The first will hold a reference to the target that this indicator...
Change the font size
Change margin width
Change background colour