I have some code that’s gonna calculate the XP of the player in percent. So I have these variables:
public float playerXP = 57f;
public float playerNextLevel = 230f;
And this is where I calculate:
Debug.Log (playerXP/playerNextLevel);
This now gives me
0.2478261
But how do I make it a whole percentage without decimals? Like 24% instead of 0.2478261
Thank you!