The XP Manager is a basic example of the leveling and experience system in most RPG games. It is created to show you how you can reward the player with experience points by finishing quests and how the player levels up.
Add the “ExperienceManager.cs/.js” script in your scene:
1) Max Level: The maximum level that the player could reach.
2) Level 1 XP: The amount of XP needed to level up from the first to the second level. This number will be used to determine the amount of XP needed in each level:
NeededXP = Level1XP*CurrentLevel
3) Save And Load: Tick this option if you want to save the player’s experience points and level.
4) Level UP Sound: Audio clip played when the player levels up.
Experience/Level UI Bar:
Add the “XPUI.cs/.js” script in your scene:
1) Full/Empty Bar: Create two UI Images to be used as the XP bar (follow the example in the demo scene).
2) Level Text: UI Text object that will display the player’s current level.