hi everyone
I am making role-playing game… (RPG)… as u know in these games there are some menu like SKILL MENU or QUEST MENU &…
I want that for example on press one button game paused and then open the menu with graphic and buttons… use int in script like number of skill &… to show the number of things… I don’t have any idea how to make something like this… a graphical background with graphical numbers and bars &… as u see in so many games… could any one help me step by step to make this … or if there is any video that show how to make them I would be glad…
thnx…
You should start by create a script that contains all your variables(number of skill etc…)
Make those variables static:
static variable numberOfSkill : int;
In this script you can for example create a system so the player can level up.
Then, create another script wich will be the menu.
Start the script with a fuction OnGUI. Now you have to acces the variables in the other script. Use the name of the script with the variables followed a dot and the name of your static variable. For example: variableScript.numberOfSkill
Now you can combine these in the OnGUI function.
Fuction OnGUI()
{
GUI.Box(Rect(100,100,200,200), variableScript.numberOfSkill);
}
This will make a simple box with the default layout. In the box you can see the variable numberOfSkill. If you would like to change the layout you can use guiSkins and guiStyle.
Some more information on GUI in unity: