UNITY | PROJECT | RPG Project |17.Mini Map, SkyBox, & Money Saving

2
Creating MiniMap
3
Creating MiniMap
  • Create MiniMap by using UI-RawImage
49.png
Adding Camera to MiniMap
5
Creating “RenderTexture”
6
Adding Texture to MiniMap
  • the result image from Camera to RenderTexture by adding it to Target Texture
  • add the RenderTexture to MiniMap
7-1
MiniMap Working
7
Add Pointer on MiniMap
8
Windows – Rendering – Lighting Settings
96-e1536540831896.png
Adding SkyBox
11
SkyBox Applied

12

13
UI for Gold
142.png
“GloblaCash” Script
  • create variables for
    • gold as static
    • gold as internal path
    • UI
  • in Update() method,
    • making Gold variables global
    • put the gold information to UI
15
“QuestComplete” Script
  • add a line of code to get 100 gold when completing quest
15-1
Obtaining Gold
17
“SaveGold” Script
  • in Start() method,
    • make this script load the amount of gold saved when the games starts by using PlayerPrefs.GetInt()
16
“QuestComplete” Script
  • after obtaining gold, update the save file for gold by using PlayerPrefs.SetInt()

181.png

AC_12
Gold Loading Working
  • after Quest complete, when we start the game again, the gold obtained last time is saved in SaveGold