Game Development Reference
In-Depth Information
Engage thrusters
Let's get started. To create the
RocketLauncher
and
RocketUI
scripts, perform the
following steps:
1. First, in the
Hierarchy
view, we will create the
RocketUI
prefab by going to
GameObject
|
Create Other
|
GUI Texture
; name it
RocketUI
and set it as fol-
lows:
Transform
X
:
0.9
,
Y
:
0.08
, and
Z
:
0
Position
X
:
0
,
Y
:
0
, and
Z
:
0
Rotation
X
:
0
,
Y
:
0
, and
Z
:
1
Scale
GUITexture
Texture
rocketUI
(located in the
Resources/UI
folder in the
Project
view)
Pixel Inset
X
:
-64
,
W
:
128
,
Y
:
-32
, and
H
:
64
2. Now, we will create the
Text
and
Shadow
objects by going to
GameObject
|
Create Other
|
GUI Text
twice; name the first object
Text
and the second one
Shadow
. Then, in the
Hierarchy
view, we need to drag the
Shadow
object inside
the
Text
object and the
Text
object inside the
RocketUI
object, as shown in the
following screenshot:
3. Then, we will click on the
Text
object, go to the
Inspector
view, and set it as fol-
lows:
Transform