Skip to content

Commit 1ed2063

Browse files
committed
fix: fixing an issue in Accounts that wiped out probe data
- Apparently Accounts probes had dependencies when created on UnityEvents, that had to trigger back to the Accounts system. So when multiple probes were created in one frame the system would fail
1 parent 0aa17e5 commit 1ed2063

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Assets/Scripts/Accounts/BackendComms/UnisaveAccountsManager.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using UnityEngine.Events;
77
using System.Linq;
88
using UnityEditor;
9+
using System.Threading.Tasks;
910

1011
/// <summary>
1112
/// Handles connection with the Unisave system, and passing data back-and-forth with the TPManager
@@ -109,7 +110,7 @@ public void Login()
109110
.Done();
110111
}
111112

112-
private void LoadPlayerCallback(PlayerEntity player)
113+
private async void LoadPlayerCallback(PlayerEntity player)
113114
{
114115
_player = player;
115116

@@ -127,6 +128,8 @@ private void LoadPlayerCallback(PlayerEntity player)
127128
Debug.Log($"Creating probe {UUID} if active: {data.active}");
128129
if (data.active && !ProbeManager.Instances.Any(x => x.UUID.Equals(UUID)))
129130
UpdateCallbackEvent(GetProbeInsertionData(data.UUID), true);
131+
132+
await Task.Delay(1);
130133
}
131134

132135
// Update UI

0 commit comments

Comments
 (0)