From e74f994a8aeb8a585f10ceb7a68d5dc790f1946f Mon Sep 17 00:00:00 2001 From: Thorbjoern Date: Tue, 22 Jul 2025 02:29:54 +0200 Subject: [PATCH 1/3] VR App Adjustments --- Assets/VRMPAssets/Settings/URP-Performant.asset | 10 +++++----- ProjectSettings/EditorBuildSettings.asset | 16 ++++++++-------- ProjectSettings/ProjectSettings.asset | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) 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/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 1318829..5206e27 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -26,28 +26,28 @@ EditorBuildSettings: - enabled: 0 path: Assets/_Scenes/NoPortals.unity guid: 81d48c986e5269c4ba9aecee678c8204 - - enabled: 0 + - enabled: 1 path: Assets/_Scenes/VRHomeSceneMeta Offline.unity guid: b98b0de9fe670d2469cfbcd6e1d2d8f5 - - enabled: 1 + - enabled: 0 path: Assets/_Scenes/TrainingObserverMeta.unity guid: 0572ea139ec37b84b88a8d21771f7f1a - enabled: 0 path: Assets/_Scenes/NetworkTest.unity guid: b5976c62b73452e43a494b19eee50119 - - enabled: 1 + - enabled: 0 path: Assets/_Scenes/Scene.unity guid: 11b18db492095254c9c0a7b292054491 - enabled: 1 path: Assets/_Scenes/CQB/Room 1.unity guid: 2e4e9a5b844db9f458416b2581e2578c - - enabled: 1 + - enabled: 0 path: Assets/_Scenes/CQB/Room 2.unity guid: 72daf40eaf586c147b8409af02cc27f2 - enabled: 1 path: Assets/_Scenes/CQB/Room 3.unity guid: 12415f6ebf42d2f47ab95cb8fc0274b3 - - enabled: 1 + - enabled: 0 path: Assets/_Scenes/CQB/Room 4.unity guid: 9c3e0cbba3a803842b86a08ec509fa92 - enabled: 1 @@ -68,13 +68,13 @@ EditorBuildSettings: - enabled: 1 path: Assets/_Scenes/CQB/Room 10.unity guid: c9eb5c51cf179f74fbfb717cfaf47e06 - - enabled: 1 + - enabled: 0 path: Assets/_Scenes/CQB/Room 11.unity guid: 2e02886277d207e4ba89ce5163286c99 - - enabled: 1 + - enabled: 0 path: Assets/_Scenes/CQB/Room 12.unity guid: 183ff68200b7fb8498ca55bf95de872c - - enabled: 0 + - enabled: 1 path: Assets/_Scenes/CQB/End.unity guid: 1aa1485b0239d5943aaca87a1154ad67 m_configObjects: diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 1490435..b114f6f 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -13,7 +13,7 @@ PlayerSettings: useOnDemandResources: 0 accelerometerFrequency: 60 companyName: TH - productName: RoomAware Replay App + productName: RoomAware VR defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} @@ -167,7 +167,7 @@ PlayerSettings: androidMaxAspectRatio: 2.4 androidMinAspectRatio: 1 applicationIdentifier: - Android: com.TH.RoomAwareVRNoPortals + Android: com.TH.RoomAwareVR Standalone: com.DefaultCompany.VR-Multiplayer iPhone: com.Unity-Technologies.com.unity.template.urp-blank buildNumber: From 1e8853d8c3749554ef5dcf998b3a27d70174a62b Mon Sep 17 00:00:00 2001 From: Thorbjoern Date: Tue, 22 Jul 2025 21:58:54 +0200 Subject: [PATCH 2/3] Offline Patch --- Assets/_Scripts/GhostSystem/GhostRecorderBatch.cs | 12 ++++++++---- Assets/_Scripts/GhostSystem/SupabaseManager.cs | 5 +++-- ProjectSettings/ProjectSettings.asset | 6 +++--- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Assets/_Scripts/GhostSystem/GhostRecorderBatch.cs b/Assets/_Scripts/GhostSystem/GhostRecorderBatch.cs index 7f9b156..869d2a7 100644 --- a/Assets/_Scripts/GhostSystem/GhostRecorderBatch.cs +++ b/Assets/_Scripts/GhostSystem/GhostRecorderBatch.cs @@ -53,7 +53,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() @@ -116,13 +118,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) @@ -145,7 +149,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 diff --git a/Assets/_Scripts/GhostSystem/SupabaseManager.cs b/Assets/_Scripts/GhostSystem/SupabaseManager.cs index f6c9ea0..9014e70 100644 --- a/Assets/_Scripts/GhostSystem/SupabaseManager.cs +++ b/Assets/_Scripts/GhostSystem/SupabaseManager.cs @@ -48,9 +48,9 @@ namespace GhostSystem } Debug.Log("🌠Starting Supabase setup..."); - await RunDiagnostics(); + //await RunDiagnostics(); - await InitSupabaseAsync(); + //await InitSupabaseAsync(); OnSuperbaseReady?.Invoke(); } @@ -141,6 +141,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/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index b114f6f..8f7b478 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -13,7 +13,7 @@ PlayerSettings: useOnDemandResources: 0 accelerometerFrequency: 60 companyName: TH - productName: RoomAware VR + productName: RoomAware VR Fully Offline defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} @@ -167,7 +167,7 @@ PlayerSettings: androidMaxAspectRatio: 2.4 androidMinAspectRatio: 1 applicationIdentifier: - Android: com.TH.RoomAwareVR + 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 From b4cdb3a57be7c9d1ce60ec4c105b3104b1132fba Mon Sep 17 00:00:00 2001 From: Thorbjoern Date: Wed, 23 Jul 2025 00:15:13 +0200 Subject: [PATCH 3/3] Made the Logs uploadable --- Assets/_Scenes/VRHomeSceneMeta Offline.unity | 25 ++++++++++--------- .../_Scripts/GhostSystem/SupabaseManager.cs | 2 +- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Assets/_Scenes/VRHomeSceneMeta Offline.unity b/Assets/_Scenes/VRHomeSceneMeta Offline.unity index 344d18e..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: @@ -9322,10 +9323,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 2045408655} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 186, y: -150.7} - m_SizeDelta: {x: 372, y: 30} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1566043034 MonoBehaviour: @@ -10511,10 +10512,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 2045408655} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 186, y: -103.7} - m_SizeDelta: {x: 372, y: 50} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1797910565 MonoBehaviour: @@ -11078,10 +11079,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 2045408655} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 186, y: -35.85} - m_SizeDelta: {x: 372, y: 71.7} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 71.7} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1864973021 MonoBehaviour: diff --git a/Assets/_Scripts/GhostSystem/SupabaseManager.cs b/Assets/_Scripts/GhostSystem/SupabaseManager.cs index 9014e70..78fafcf 100644 --- a/Assets/_Scripts/GhostSystem/SupabaseManager.cs +++ b/Assets/_Scripts/GhostSystem/SupabaseManager.cs @@ -18,7 +18,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;