【发布时间】:2022-01-22 02:39:28
【问题描述】:
Firebase 数据库在应用中的其他类似操作之间需要时无法下载数据。
System.Collections.Generic.Dictionary`2[System.String,System.Object]
Firebase 有时在应用程序的类似操作中间无法执行新的GetValueASync 并抛出System.Collections.Generic.Dictionary2[System.String,System.Object]` 作为快照值。
重现步骤:
使用实时数据库设置任何统一项目,多次不间断地执行:
.GetValueAsync().ContinueWithOnMainThread(task =>
那么您将获得 System.Collections.Generic.Dictionary2[System.String,System.Object]` 的值,而不是任何子/键/数据库值。
public void aaaa() {
Reference.Child("Users").OrderByChild("About/XP").StartAt(1).LimitToFirst(12).GetValueAsync().ContinueWithOnMainThread(task => {
if (task.IsFaulted) {
return;
} else if (task.IsCompleted) {
DataSnapshot Snapshot = task.Result;
if (Snapshot != null)
Debug.Log(Snapshot.Value);
return;
}
return;
});
【问题讨论】:
标签: c# dictionary unity3d firebase-realtime-database