1 Commits

Author SHA1 Message Date
Thorbjoern 0359130f1d Added option to flush manually 2025-06-30 10:30:13 +02:00
4 changed files with 1189 additions and 1150 deletions
@@ -26,7 +26,7 @@ MonoBehaviour:
m_SupportsHDR: 0 m_SupportsHDR: 0
m_HDRColorBufferPrecision: 0 m_HDRColorBufferPrecision: 0
m_MSAA: 4 m_MSAA: 4
m_RenderScale: 1 m_RenderScale: 1.6
m_UpscalingFilter: 0 m_UpscalingFilter: 0
m_FsrOverrideSharpness: 0 m_FsrOverrideSharpness: 0
m_FsrSharpness: 0.92 m_FsrSharpness: 0.92
File diff suppressed because it is too large Load Diff
@@ -83,11 +83,11 @@ namespace GhostSystem
RecordSample(); RecordSample();
} }
if (_frameBuffer.Count >= BatchSize || _flushTimer >= FlushInterval) /*if (_frameBuffer.Count >= BatchSize || _flushTimer >= FlushInterval)
{ {
_flushTimer = 0f; _flushTimer = 0f;
_ = FlushBatchAsync(); // Fire and forget _ = FlushBatchAsync(); // Fire and forget
} }*/
} }
private void RecordSample() private void RecordSample()
@@ -105,6 +105,8 @@ namespace GhostSystem
var batch = new List<FrameModel>(_frameBuffer); var batch = new List<FrameModel>(_frameBuffer);
_frameBuffer.Clear(); _frameBuffer.Clear();
Debug.Log("Flush Frame Buffer");
Debug.Log("Buffer: " + batch.Count);
try try
{ {
@@ -153,6 +155,7 @@ namespace GhostSystem
sceneIdReady = false; sceneIdReady = false;
OnStopRecord?.Invoke(); OnStopRecord?.Invoke();
Debug.Log($"Stop recording: {SceneId}"); Debug.Log($"Stop recording: {SceneId}");
Debug.Log("Framebuffer: " + _frameBuffer.Count + "Frames");
if (doorCount > 0 && TrackedObjects.Count >= doorCount) if (doorCount > 0 && TrackedObjects.Count >= doorCount)
{ {
@@ -161,6 +164,12 @@ namespace GhostSystem
doorCount = 0; doorCount = 0;
} }
public void Flush()
{
_flushTimer = 0f;
_ = FlushBatchAsync(); // Fire and forget
}
} }
} }
+2 -2
View File
@@ -13,7 +13,7 @@ PlayerSettings:
useOnDemandResources: 0 useOnDemandResources: 0
accelerometerFrequency: 60 accelerometerFrequency: 60
companyName: TH companyName: TH
productName: RoomAwareVR (offline oldRig) productName: RoomAwareVR (Flush after Scene)
defaultCursor: {fileID: 0} defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0} cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
@@ -167,7 +167,7 @@ PlayerSettings:
androidMaxAspectRatio: 2.4 androidMaxAspectRatio: 2.4
androidMinAspectRatio: 1 androidMinAspectRatio: 1
applicationIdentifier: applicationIdentifier:
Android: com.TH.RoomAwareVRofflineoldRig Android: com.TH.RoomAwareVRFlushafterScene
Standalone: com.DefaultCompany.VR-Multiplayer Standalone: com.DefaultCompany.VR-Multiplayer
iPhone: com.Unity-Technologies.com.unity.template.urp-blank iPhone: com.Unity-Technologies.com.unity.template.urp-blank
buildNumber: buildNumber: