c# - 有什么办法可以加快使用 Google Play 游戏打开存档的速度吗?
问题描述
我正在使用 Unity 的官方 Google Play 游戏插件。我OpenWithAutomaticConflictResolution
用来打开一个特定的保存。问题是它非常慢。平均需要 400 到 500 毫秒才能完成,在某些情况下可能需要长达 8 秒。我正在使用此代码对过程进行计时
Stopwatch sw = new Stopwatch();
sw.Start();
PlayGamesPlatform.Instance.SavedGame.OpenWithAutomaticConflictResolution(filename, GooglePlayGames.BasicApi.DataSource.ReadCacheOrNetwork,
ConflictResolutionStrategy.UseOriginal, (status, data) =>
{
sw.Stop();
System.Diagnostics.Debug.WriteLine($"[SW] Open {sw.ElapsedMilliseconds}");
保存文件不是特别大,不到 40 KB。此外,我希望设备上的缓存能够防止如此长的加载时间。我能做些什么来加快速度吗?
解决方案
推荐阅读
- html - 侧导航内的右对齐图标按钮
- c# - 在 C# 中显示大文本文件的最快方法是什么?
- javascript - 浏览器中的 HTTP 响应被截断
- php - PHP Quiz 实际上并没有检查答案是否正确,而是总是说正确
- java - 播放 2.5.12 Mailer (play-mailer 5.0.0) 插件在使用 .send() 方法时导致 NullPointerException - mailerClient 永远不会用 @Inject 实例化
- facebook - 无需重定向的 AWS Cognito 和 Facebook 注册
- c# - 动态 LINQ 的 OrderBy 注入危险吗?
- ubuntu-16.04 - 重新启动后添加到 docker 组的用户不保留
- python - Python Pandas Dataframe 使用列和更改分类数据
- c# - 以其他方法获取gridview单元格