2017-09-19 40 views
0

当更新增量成就时,成就列表会长时间加载(〜30-60秒),解锁成就不会显示(成就成功解锁成就列表)。仿佛事件的队列正在被打击。没有人遇到过?更新成果进度的方法不经常被调用,特别重新检查。长时间加载/更新成就(Google Play for Unity)

我的代码:

EventManager.CoinTaken.Subscribe(() => 
{ 
    PlayGamesPlatform.Instance.IncrementAchievement(GPGSIds.achievement_collect_100_coins, 1, null); 
    PlayGamesPlatform.Instance.IncrementAchievement(GPGSIds.achievement_collect_250_coins, 1, null); 
    PlayGamesPlatform.Instance.IncrementAchievement(GPGSIds.achievement_collect_500_coins, 1, null); 
}); 

硬币取平均每隔10-30秒。

我使用play-games-plugin-for-unity Unity插件。

回答

0

找到了一个教程,可能有帮助here。他的所作所为被放置在:

PlayGamesPlatform.Instance.IncrementAchievement(id, stepsToIncrement, success => { }); 

功能

public static void IncrementAchievement(string id, int stepsToIncrement) 
    { 
     PlayGamesPlatform.Instance.IncrementAchievement(id, stepsToIncrement, success => { }); 
    } 

可能会触发他每次按下按钮的时间内。更新是即时的。希望有所帮助。