UNITY | PROJECT | RPG Tutorial |3. HUD, UI, & Environment(Water)

2-0
Making the soil a little higher
2-1
Smoothing the soil
2-2
Lower the soil a little for water to flow
3-0
Creating Water
  • import water from Unity Standard Asset
  • Water is just an object concrete
3-1
Modifying Water
4-0
Water Modified
4-1
Water
5
Adding another Tree
68.png
Tree
7
UI – RawImage
  • add UI – RawImage
    • The Raw Image control displays a non-interactive image to the user
    • Since the Raw Image does not require a sprite texture, you can use it to display any texture available to the Unity player
8-0
Canvas | Screen through Camera
  • the white line means our monitor’s screen

 

8-1
Rawimage working
9
RawImage | Anch
  • PosX & PosY means the RawImage is apart from the anchor(Top-Left) by 75
10
Adding Heart Texture to RawImage
11
Creating a blank space for Heart
12
Blank Heart Anchored Top-Left
13
Heart Anchored Center | Child Object of Blank Heart
  • Since ViewHearts are Child Object of Heart, their position is based on the Heart’s
14
Making Heart Indicator by Duplicating
15
“HeartMonitor” Script
  • Create Variables
    • to use in another script make heartValue as Static
    • internalHeart is to be used as a path to heartValue
    • to use Heart, Create GameObject as a vessel
  • in Update() method,
    • create if statement, making Heart Active, whenever Player collects one
16
“Heathcollects” Scritp
17-0
Creating HealthMonitor from Empty GameObject | Adding Hearts to Script
17-1
Collecting Heart & HeartMonitor Working
18-0
“HeartMonitor” Script
  • in Start() method
    • set the initial value of heartValue as 1

 

 

18-1
Collecting Hearts

 

“when Unity says, “There are 2 audio lister”, remove main camera if you are using FPS Character”