Question by
TudouGames · Jan 02, 2021 at 08:04 AM ·
steamleaderboards
Steam leaderboard - How to format int into milliseconds?
So am in the process of building a car racing game for Steam platform and want the user to be able to upload their best times to a leaderboard. I've created the leaderboard in the Steamworks portal and set the display type to 'milliseconds'. Obviously, the main time variable is a float which I am multiplying by 1000 and converting to an int before submitting to Steamworks (which works fine for Google Play leaderboards) as per this code :
myRaceTimerFloat = myRaceTimerFloat * 1000;
Mathf.RoundToInt(myRaceTimerFloat);
However, once uploaded to the leaderboard it shows as an int and not in time format. Can anyone tell me what I'm doing wrong? Thanks.
Comment