diff --git a/Assets/_Scripts/GhostSystem/GhostRecorderBatch.cs b/Assets/_Scripts/GhostSystem/GhostRecorderBatch.cs index 1689a68..b13cacd 100644 --- a/Assets/_Scripts/GhostSystem/GhostRecorderBatch.cs +++ b/Assets/_Scripts/GhostSystem/GhostRecorderBatch.cs @@ -129,6 +129,8 @@ namespace GhostSystem { Debug.LogWarning($"Batch insert failed: {response.ResponseMessage.StatusCode}, fallback to offline."); await FallbackToOfflineAsync(batch); + OnUploadFinished?.Invoke(); // Die Action für das Ende des Ladescreens wird trotzdem ausgelöst. + Debug.Log("Upload Finished"); } if (response.ResponseMessage.IsSuccessStatusCode && sceneIdReady) // Löst Action aus, wenn der Upload geklappt hat und die neue Szene geladen ist. { diff --git a/Assets/_Scripts/GhostSystem/SupabaseManager.cs b/Assets/_Scripts/GhostSystem/SupabaseManager.cs index 9f8ffbf..f6c9ea0 100644 --- a/Assets/_Scripts/GhostSystem/SupabaseManager.cs +++ b/Assets/_Scripts/GhostSystem/SupabaseManager.cs @@ -70,10 +70,10 @@ namespace GhostSystem else { email = string.IsNullOrEmpty(SystemInfo.deviceUniqueIdentifier) - ? $"{Guid.NewGuid()}@device.local" + ? $"{Guid.NewGuid()}@device.local" // Fallback, generiert theoretisch bei jeder Neuinstallation der App einen anderen User. : $"{SystemInfo.deviceUniqueIdentifier}@device.local"; - password = Convert.ToBase64String(Guid.NewGuid().ToByteArray()); + password = email; // selbe GUID, damit das Passwort sich nicht pro App-Version verändern kann. await UniTask.Run(() => File.WriteAllLines(path, new[] { email, password })); }