diff --git a/Assets/VRMPAssets/Settings/URP-Performant.asset b/Assets/VRMPAssets/Settings/URP-Performant.asset index df637d5..431f559 100644 --- a/Assets/VRMPAssets/Settings/URP-Performant.asset +++ b/Assets/VRMPAssets/Settings/URP-Performant.asset @@ -19,7 +19,7 @@ MonoBehaviour: m_RendererDataList: - {fileID: 11400000, guid: 707360a9c581a4bd7aa53bfeb1429f71, type: 2} m_DefaultRendererIndex: 0 - m_RequireDepthTexture: 1 + m_RequireDepthTexture: 0 m_RequireOpaqueTexture: 0 m_OpaqueDownsampling: 1 m_SupportsTerrainHoles: 0 @@ -100,9 +100,9 @@ MonoBehaviour: m_Keys: [] m_Values: m_PrefilteringModeMainLightShadows: 3 - m_PrefilteringModeAdditionalLight: 3 + m_PrefilteringModeAdditionalLight: 4 m_PrefilteringModeAdditionalLightShadows: 2 - m_PrefilterXRKeywords: 1 + m_PrefilterXRKeywords: 0 m_PrefilteringModeForwardPlus: 0 m_PrefilteringModeDeferredRendering: 0 m_PrefilteringModeScreenSpaceOcclusion: 0 @@ -122,10 +122,10 @@ MonoBehaviour: m_PrefilterDBufferMRT1: 1 m_PrefilterDBufferMRT2: 1 m_PrefilterDBufferMRT3: 1 - m_PrefilterSoftShadowsQualityLow: 1 + m_PrefilterSoftShadowsQualityLow: 0 m_PrefilterSoftShadowsQualityMedium: 1 m_PrefilterSoftShadowsQualityHigh: 1 - m_PrefilterSoftShadows: 0 + m_PrefilterSoftShadows: 1 m_PrefilterScreenCoord: 1 m_PrefilterNativeRenderPass: 1 m_PrefilterUseLegacyLightmaps: 0 diff --git a/Assets/_Scenes/VRHomeSceneMeta Offline.unity b/Assets/_Scenes/VRHomeSceneMeta Offline.unity index b8a2bae..e17c3e4 100644 --- a/Assets/_Scenes/VRHomeSceneMeta Offline.unity +++ b/Assets/_Scenes/VRHomeSceneMeta Offline.unity @@ -795,6 +795,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8983945cca89adc46aab1638d1823d76, type: 3} m_Name: m_EditorClassIdentifier: + userId: 09321725-0150-4df0-92a7-029005cc75eb textbox: {fileID: 1864973021} --- !u!4 &80522956 Transform: diff --git a/Assets/_Scripts/GhostSystem/GhostRecorderBatch.cs b/Assets/_Scripts/GhostSystem/GhostRecorderBatch.cs index c0ac239..7f93b54 100644 --- a/Assets/_Scripts/GhostSystem/GhostRecorderBatch.cs +++ b/Assets/_Scripts/GhostSystem/GhostRecorderBatch.cs @@ -55,7 +55,9 @@ namespace GhostSystem private void Start() { - _offlinePath = Path.Combine(Application.persistentDataPath, "offline_log.jsonl"); + string now = DateTime.Now.ToString("yyyyMMdd_HHmmss"); + string dateiname = now + ".jsonl"; + _offlinePath = Path.Combine(Application.persistentDataPath, dateiname); } private void HandleSupabaseReady() @@ -118,13 +120,15 @@ namespace GhostSystem private async UniTaskVoid FlushBatchAsync() // Die eigentliche Methode zum Hochladen eines Batches/leeren des Buffers. { - if (_frameBuffer.Count == 0 || !supabaseReady) return; + if (_frameBuffer.Count == 0) return; var batch = new List(_frameBuffer); _frameBuffer.Clear(); Debug.Log("Flushing Frame Buffer"); - try + await FallbackToOfflineAsync(batch); + OnUploadFinished?.Invoke(); // Die Action für das Ende des Ladescreens wird trotzdem ausgelöst. + /*try { var response = await SupabaseManager.instance.supabase.From().Insert(batch); // Versucht, den Batch an Superbase hochzuladen if (!response.ResponseMessage.IsSuccessStatusCode) @@ -147,7 +151,7 @@ namespace GhostSystem await FallbackToOfflineAsync(batch); // Bei nicht erfolgtem Upload wird der Batch lokal gescpeichert. OnUploadFinished?.Invoke(); // Die Action für das Ende des Ladescreens wird trotzdem ausgelöst. Debug.Log("Upload Finished"); - } + }*/ } private async UniTask FallbackToOfflineAsync(List batch) // Schreibt den Buffer in eine Datei, falls Upload nicht möglich. Kann zu Rucklern führen. diff --git a/Assets/_Scripts/GhostSystem/SupabaseManager.cs b/Assets/_Scripts/GhostSystem/SupabaseManager.cs index c72b3d1..1df2a3e 100644 --- a/Assets/_Scripts/GhostSystem/SupabaseManager.cs +++ b/Assets/_Scripts/GhostSystem/SupabaseManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using UnityEngine; using UnityEngine.Networking; @@ -21,7 +21,7 @@ namespace GhostSystem public const string supabaseAnonKey = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNlemdoeHp0dnlnZ3dndW55aG1xIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDcyMTk5MzcsImV4cCI6MjA2Mjc5NTkzN30.vr6-3X3Ux_DjcCiw_CqG-VKP8BiBXtmCzAXjYTiA_vY"; public Client supabase { get; private set; } - public string userId => supabase?.Auth?.CurrentUser?.Id; + public string userId = "09321725-0150-4df0-92a7-029005cc75eb"; private string email; private string password; @@ -144,6 +144,7 @@ namespace GhostSystem } else { + //textbox.text += $"\n\rSupabase health check failed: {www.error}"; Debug.LogError($"Supabase health check failed: {www.error}"); } diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 61bf390..831d644 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -26,7 +26,7 @@ EditorBuildSettings: - enabled: 0 path: Assets/_Scenes/Scenes not in use/NoPortals.unity guid: 81d48c986e5269c4ba9aecee678c8204 - - enabled: 0 + - enabled: 1 path: Assets/_Scenes/VRHomeSceneMeta Offline.unity guid: b98b0de9fe670d2469cfbcd6e1d2d8f5 - enabled: 0 diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index f73b6a5..dfa8c09 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -167,7 +167,7 @@ PlayerSettings: androidMaxAspectRatio: 2.4 androidMinAspectRatio: 1 applicationIdentifier: - Android: com.TH.RoomAwareVRNoPortals + Android: com.TH.RoomAwareVRFullyOffline Standalone: com.DefaultCompany.VR-Multiplayer iPhone: com.Unity-Technologies.com.unity.template.urp-blank buildNumber: @@ -184,7 +184,7 @@ PlayerSettings: stripEngineCode: 1 iPhoneStrippingLevel: 0 iPhoneScriptCallOptimization: 0 - ForceInternetPermission: 1 + ForceInternetPermission: 0 ForceSDCardPermission: 0 CreateWallpaper: 0 androidSplitApplicationBinary: 0