diff --git a/Assets/VRMPAssets/Settings/URP-Performant.asset b/Assets/VRMPAssets/Settings/URP-Performant.asset index a03aeb0..3ce735e 100644 --- a/Assets/VRMPAssets/Settings/URP-Performant.asset +++ b/Assets/VRMPAssets/Settings/URP-Performant.asset @@ -26,7 +26,7 @@ MonoBehaviour: m_SupportsHDR: 0 m_HDRColorBufferPrecision: 0 m_MSAA: 4 - m_RenderScale: 1 + m_RenderScale: 1.6 m_UpscalingFilter: 0 m_FsrOverrideSharpness: 0 m_FsrSharpness: 0.92 diff --git a/Assets/_Materials/LoadingScreen.mat b/Assets/_Materials/LoadingScreen.mat index 5f21be5..00d83e9 100644 --- a/Assets/_Materials/LoadingScreen.mat +++ b/Assets/_Materials/LoadingScreen.mat @@ -8,16 +8,17 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: LoadingScreen - m_Shader: {fileID: 4800000, guid: fadb727869e4c4392bda563f077b98ed, type: 3} + m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 + m_DoubleSidedGI: 1 m_CustomRenderQueue: -1 - stringTagMap: {} + stringTagMap: + RenderType: Opaque disabledShaderPasses: - MOTIONVECTORS m_LockedProperties: @@ -89,18 +90,21 @@ Material: - _AddPrecomputedVelocity: 0 - _AlphaClip: 0 - _AlphaToMask: 0 + - _ApertureSize: 0.7 - _Blend: 0 - _BlendModePreserveSpecular: 1 + - _BlendOp: 0 - _BumpScale: 1 - _ClearCoatMask: 0 - _ClearCoatSmoothness: 0 - - _Cull: 2 + - _Cull: 1 - _Cutoff: 0.5 - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 0 - _DstBlendAlpha: 0 - _EnvironmentReflections: 1 + - _FeatheringEffect: 0.2 - _GlossMapScale: 0 - _Glossiness: 0 - _GlossyReflections: 0 @@ -110,6 +114,7 @@ Material: - _PassthroughAmount: 1 - _QueueOffset: 0 - _ReceiveShadows: 1 + - _SampleGI: 0 - _Smoothness: 0 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 @@ -124,6 +129,8 @@ Material: - _Color: {r: 0, g: 0, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + - _VignetteColor: {r: 0, g: 0, b: 0, a: 1} + - _VignetteColorBlend: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] m_AllowLocking: 1 --- !u!114 &3928478412198296256 diff --git a/Assets/_Scenes/TestSceneMeta Offline.unity b/Assets/_Scenes/TestSceneMeta Offline.unity index e688064..4895f5f 100644 --- a/Assets/_Scenes/TestSceneMeta Offline.unity +++ b/Assets/_Scenes/TestSceneMeta Offline.unity @@ -11485,7 +11485,7 @@ RectTransform: 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_SizeDelta: {x: 0, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1797910565 MonoBehaviour: @@ -12062,7 +12062,7 @@ RectTransform: 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_SizeDelta: {x: 0, y: 71.7} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1864973021 MonoBehaviour: diff --git a/Assets/_Scripts/GhostSystem/GhostRecorderBatch.cs b/Assets/_Scripts/GhostSystem/GhostRecorderBatch.cs index 452436e..0f0e5f0 100644 --- a/Assets/_Scripts/GhostSystem/GhostRecorderBatch.cs +++ b/Assets/_Scripts/GhostSystem/GhostRecorderBatch.cs @@ -136,14 +136,20 @@ namespace GhostSystem { Debug.LogWarning($"Batch insert failed: {response.ResponseMessage.StatusCode}, fallback to offline."); await FallbackToOfflineAsync(batch); - OnUploadFinished?.Invoke(); } + if(response.ResponseMessage.IsSuccessStatusCode && sceneIdReady) + { + OnUploadFinished?.Invoke(); + Debug.Log("Upload Finished"); + } + } catch (Exception ex) { Debug.LogWarning($"Insert failed, fallback to offline: {ex.Message}"); await FallbackToOfflineAsync(batch); OnUploadFinished?.Invoke(); + Debug.Log("Upload Finished"); } } @@ -190,6 +196,7 @@ namespace GhostSystem public void Flush() { _flushTimer = 0f; + //FlushBatchAsync(); _ = FlushBatchAsync(); // Fire and forget } } diff --git a/Assets/_Scripts/GhostSystem/SupabaseManager.cs b/Assets/_Scripts/GhostSystem/SupabaseManager.cs index 585d431..9f8ffbf 100644 --- a/Assets/_Scripts/GhostSystem/SupabaseManager.cs +++ b/Assets/_Scripts/GhostSystem/SupabaseManager.cs @@ -136,12 +136,12 @@ namespace GhostSystem if (www.result == UnityWebRequest.Result.Success) { - textbox.text += $"\n\rSupabase health: {www.downloadHandler.text}"; + //textbox.text += $"\n\rSupabase health: {www.downloadHandler.text}"; Debug.Log($"✅ Supabase health: {www.downloadHandler.text}"); } else { - textbox.text += $"\n\rSupabase health check failed: {www.error}"; + //textbox.text += $"\n\rSupabase health check failed: {www.error}"; Debug.LogError($"❌ Supabase health check failed: {www.error}"); } } @@ -153,7 +153,7 @@ namespace GhostSystem if (www.result == UnityWebRequest.Result.Success) { - textbox.text += "\n\rGoogle request succeeded."; + //textbox.text += "\n\rGoogle request succeeded."; Debug.Log("✅ Google request succeeded."); } else diff --git a/Assets/_Scripts/Utility/FlushAndLoad.cs b/Assets/_Scripts/Utility/FlushAndLoad.cs index 555c272..5139422 100644 --- a/Assets/_Scripts/Utility/FlushAndLoad.cs +++ b/Assets/_Scripts/Utility/FlushAndLoad.cs @@ -2,6 +2,7 @@ using GhostSystem; using UnityEngine; using UnityEngine.SceneManagement; using TMPro; +using System.Collections.Generic; public class FlushAndLoad : MonoBehaviour { @@ -13,11 +14,13 @@ public class FlushAndLoad : MonoBehaviour private void OnEnable() { GhostRecorderBatch.OnUploadFinished += HandleUploadFinished; + RoomManager.OnSceneIdReady += HandleSceneIdReady; } private void OnDisable() { GhostRecorderBatch.OnUploadFinished -= HandleUploadFinished; + RoomManager.OnSceneIdReady -= HandleSceneIdReady; } // Start is called once before the first execution of Update after the MonoBehaviour is created @@ -31,17 +34,27 @@ public class FlushAndLoad : MonoBehaviour { if (OVRInput.GetDown(OVRInput.Button.SecondaryIndexTrigger)) { - output.text = "Flush...\n\r" + output.text; + output.text = "Flush..."; loadingScreen.SetActive(true); canvas.SetActive(false); recorder.Flush(); GetComponent().NewRoom(); + } } private void HandleUploadFinished() { loadingScreen.SetActive(false); + output.text = ""; + } + + private void HandleSceneIdReady(string id, List doors) + { + if (id == "Room1") + { + loadingScreen.SetActive(false); + } } } diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 0a2cf61..4850d6e 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -13,7 +13,7 @@ PlayerSettings: useOnDemandResources: 0 accelerometerFrequency: 60 companyName: TH - productName: RoomAware VR (noPortals) + productName: RoomAware VR (NoPortals) 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.RoomAwareVRNoPortals Standalone: com.DefaultCompany.VR-Multiplayer iPhone: com.Unity-Technologies.com.unity.template.urp-blank buildNumber: