I am keeping track of one achievement which needs to be completed after doing a certain task 1000 times. So that means each progress is 0.1d. Now I have no problem posting a progress score with decimal. Cause if I report of 4.1d, it shows in the log correctly:
Reporting achievement de.company.testapp.achievement1, with 4.100000
Successfully reported progress
As I don’t want to save the progress/counter inside the app, I try to add each progress of 0.1d on top of the progressCompleted but when I try to retrieve it, it gives me a whole number of 4. I tried to force showing the decimal value but it really is only showing 4.
Console.Log("current score string : " + achievement.percentCompleted.ToString("N2"));
Shows:
current score string : 4.00
Console.Log("current score full achievement : " + achievement.ToString());
Shows:
current score full achievement : de.company.testapp.achievement1 - 4 - False - False - 03/27/2013 16:21:02
It says here: http://docs.unity3d.com/Documentation/ScriptReference/IAchievement-percentCompleted.html that percentCompleted is of double type. So why is it dropping the decimal places?
I’m using Unity 4.1.1f4 and its GameCenterPlatform.
Please someone enlighten me.