Lighting System & More — Unity Game 2
Unity Game Tutorial — Episode # 02
Let’s add light enhancement!
Step#00-Go to Windows > Lighting > Settings, delete Skybox, disable Realtime Lighting; Drag Directional Light to an Empty Lighting folder;
Step#01- rename it Key Light and configure:
Rotation :
x=17; y=90; z=0
Intensity = 1
Step#02-Create another Directional Light, rename it Fill Light
Rotation :
x=135; y=0; z=0
intensity = .5
Step#03-Now set the Rim Light:
Rotation :
x=0; y=10; z=0
intensity = .3
Step#04- The Camera was deleted and set again and now it is working fine (?);
Step#05-Let’s add a HUD interface: Create UI > Canvas and rename it to HUD; leave default settings; click on 2D view on Scene Tab;
Step#06- Inside it (1) Create a UI > Panel, rename it (2) PnlGameOver and (3) middle-center it, and set:
Transform : (4)x=6; y=-2; z=0
Step#07- Create UI > Text inside PnlGameOver and (1) rename it TxtGameOver; (2) type ‘Game Over!’ as Text; (3) Font Size = 24; (4) Center it in both directions
Step#08- Create new UI > Panel, (1) rename it to PnlRestart,(2) Top-Right it, and (ups do not forget to disable Image:):
Transform : (3)
x=-145; y=-78 and z=0; Scale = .5 (4)
Step#09-Create new UI > Text, (1) rename it to TxtRestart,(2) Middle-Center it, (3) Type Press ‘R’ To Restart, (4) Font Size=24, (5) Align in the center and:
Transform : (2)
Width=160; Height=200
Step#10-Create new UI > Panel, (1) rename it to PnlScore,(2) Top-Left it, (4) Disable Image and:
Transform : (3)x=150; y=-100; z=0
Width=200; Height=100
Step#11-Create new UI > Text, (1) rename it to TxtScore,(2) Middle-Center it, (3) Type Score: 0 , (4) Font Size=14, (5) Align in top and:
Transform : (6)x=0; y=0; z=0
Width=160; Height=30
Step#12-Desable PnlGameOver and PnlRestart; this will be unable by scripts. HUD is ready!
In the next post, we will present all the scripts and run the game.
Bye for now!
Download Images/Scripts from MyGoogleDrive now!
Index:
Post # 00 — EMBRAER Super Tucano VS A-10 Thunderbolt II
Post # 01 — Preparing Scenario — Unity Game 1
Post # 02 — Lighting System & More — Unity Game 2
Post # 03 — Running Everything — Unity Game 3
References & Credits
Unity version 2017.3.1f1