I'm still learning C# and I'm making simple clicker game. My problem is that if some numbers reach 10 000 000 they start to display as 1E+07 (for example). The point is that I would like it to be shown as 10mln and higher(bln etc). And every time I try to do it I got a lot of errors. Can you give me some advices how can I do it?
using UnityEngine;
using System.Collections;
using System;
public class ping : MonoBehaviour {
public UnityEngine.UI.Text gpc;
public UnityEngine.UI.Text GoldDisplay;
public static float gold = 0.00f;
public static long toInt64()
{
return Convert.ToInt64(gold);
}
public int goldperclick = 1;
void Update(){
GoldDisplay.text = "Ping: " + gold;
gpc.text = goldperclick + "ping/click";
}
public void Clicked(){
gold += goldperclick;
}
}