🎯 Problem Statement
Recording settings like capture FPS and visualization visibility are currently only configurable via Unity Inspector. Users cannot adjust these settings from within the app on the Quest headset.
Current Limitations:
- Capture FPS is hardcoded to 3 FPS (set in Unity Inspector)
- Visualization can't be toggled without rebuilding the app
- No way to experiment with different capture rates in real-time
- Users can't disable visualization if it's distracting
Current Settings:
- Capture FPS:
CaptureTimer.targetCaptureFPS (default: 3 FPS)
- Show Visualization:
DepthPointCloudRenderer.showDebugLines (default: true)
💡 Proposed Solution
Add a settings menu accessible from the Recording Menu that allows users to adjust:
- Capture FPS - Slider or preset buttons (1 FPS, 3 FPS, 5 FPS, 10 FPS)
- Show Visualization - Toggle checkbox
Where to add:
- Extend the existing Recording Menu (Y button on left controller)
- Add a "Settings" button that opens a settings panel
📝 Current Implementation
Capture Timer
File: Assets/RealityLog/Scripts/Runtime/Common/CaptureTimer.cs
public class CaptureTimer : MonoBehaviour
{
[Header("Capture Timing")]
[Tooltip("Target FPS for synchronized camera and depth capture. Set to 0 to capture at maximum rate (~25 FPS)")]
[SerializeField] private float targetCaptureFPS = 3f; // Currently only in Inspector
public float TargetCaptureFPS => targetCaptureFPS; // Read-only
// ... rest of implementation
}
Visualization Toggle
File: Assets/RealityLog/Scripts/Runtime/Depth/DepthPointCloudRenderer.cs
public class DepthPointCloudRenderer : MonoBehaviour
{
[SerializeField] private bool showDebugLines = true; // Currently only in Inspector
// ... used in Update() to control visualization
}
🔨 Implementation Approach
Step 1: Make Settings Adjustable
Add public methods to change settings at runtime:
// CaptureTimer.cs
public void SetTargetFPS(float fps)
{
targetCaptureFPS = fps;
captureInterval = (fps > 0) ? (1f / fps) : 0f;
Debug.Log($"[CaptureTimer] FPS changed to {fps}");
}
// DepthPointCloudRenderer.cs
public void SetVisualizationEnabled(bool enabled)
{
showDebugLines = enabled;
if (!enabled)
{
ClearPointCloud();
}
}
Step 2: Create Settings UI Panel
Create a new UI component for settings:
// NEW FILE: Assets/RealityLog/Scripts/Runtime/UI/RecordingSettingsUI.cs
using UnityEngine;
using UnityEngine.UI;
using RealityLog.Common;
using RealityLog.Depth;
namespace RealityLog.UI
{
public class RecordingSettingsUI : MonoBehaviour
{
[Header("References")]
[SerializeField] private CaptureTimer captureTimer;
[SerializeField] private DepthPointCloudRenderer pointCloudRenderer;
[Header("UI Elements")]
[SerializeField] private GameObject settingsPanel;
[SerializeField] private Toggle visualizationToggle;
[SerializeField] private Button fps1Button;
[SerializeField] private Button fps3Button;
[SerializeField] private Button fps5Button;
[SerializeField] private Button fps10Button;
private void Start()
{
// Initialize UI state
if (visualizationToggle != null)
{
visualizationToggle.isOn = true;
visualizationToggle.onValueChanged.AddListener(OnVisualizationToggled);
}
// Setup FPS buttons
fps1Button?.onClick.AddListener(() => SetFPS(1f));
fps3Button?.onClick.AddListener(() => SetFPS(3f));
fps5Button?.onClick.AddListener(() => SetFPS(5f));
fps10Button?.onClick.AddListener(() => SetFPS(10f));
// Hide panel initially
settingsPanel?.SetActive(false);
}
public void ToggleSettingsPanel()
{
if (settingsPanel != null)
{
settingsPanel.SetActive(!settingsPanel.activeSelf);
}
}
private void SetFPS(float fps)
{
if (captureTimer != null)
{
captureTimer.SetTargetFPS(fps);
}
}
private void OnVisualizationToggled(bool enabled)
{
if (pointCloudRenderer != null)
{
pointCloudRenderer.SetVisualizationEnabled(enabled);
}
}
}
}
Step 3: Add Settings Button to Recording Menu
Update the existing Recording Menu UI to include a settings button.
✅ Acceptance Criteria
🎨 UI Design Suggestions
Simple Approach:
┌─────────────────────────────┐
│ Recording Settings │
├─────────────────────────────┤
│ │
│ Capture FPS: │
│ [1] [3*] [5] [10] │
│ │
│ Show Visualization: [✓] │
│ │
│ [Close] │
└─────────────────────────────┘
* = currently selected
Alternative: Use a slider for FPS instead of buttons
🧪 Testing
-
FPS Changes:
- Start recording at 3 FPS
- Open settings, change to 5 FPS
- Verify capture rate changes (check logs)
- Verify files are captured at new rate
-
Visualization Toggle:
- Disable visualization during capture
- Verify particles stop appearing
- Re-enable visualization
- Verify particles start appearing again
-
Settings Persistence:
- Change FPS to 5
- Start recording
- Stop recording
- Start new recording
- Verify still using 5 FPS
💭 Other possible Enhancements
- Save settings to PlayerPrefs (persist across app restarts)
- More granular FPS control (slider from 1-30 FPS)
- Advanced settings (grid density, raycast distance, etc.)
- Quality presets (Low/Medium/High)
- Per-session settings export
🔗 Related Files
Assets/RealityLog/Scripts/Runtime/Common/CaptureTimer.cs (lines 14-15)
Assets/RealityLog/Scripts/Runtime/Depth/DepthPointCloudRenderer.cs (line 27)
Assets/RealityLog/Scripts/Runtime/UI/RecordingMenuController.cs (Recording Menu, likely exists)
📚 Implementation Notes
Quick Implementation Path:
- Add
SetTargetFPS() method to CaptureTimer (~5 lines)
- Add
SetVisualizationEnabled() method to DepthPointCloudRenderer (~5 lines)
- Create simple settings UI in Unity (30 minutes)
- Hook up buttons/toggles to call the methods
Total Time: 1-2 hours
🎯 Problem Statement
Recording settings like capture FPS and visualization visibility are currently only configurable via Unity Inspector. Users cannot adjust these settings from within the app on the Quest headset.
Current Limitations:
Current Settings:
CaptureTimer.targetCaptureFPS(default: 3 FPS)DepthPointCloudRenderer.showDebugLines(default: true)💡 Proposed Solution
Add a settings menu accessible from the Recording Menu that allows users to adjust:
Where to add:
📝 Current Implementation
Capture Timer
File:
Assets/RealityLog/Scripts/Runtime/Common/CaptureTimer.csVisualization Toggle
File:
Assets/RealityLog/Scripts/Runtime/Depth/DepthPointCloudRenderer.cs🔨 Implementation Approach
Step 1: Make Settings Adjustable
Add public methods to change settings at runtime:
Step 2: Create Settings UI Panel
Create a new UI component for settings:
Step 3: Add Settings Button to Recording Menu
Update the existing Recording Menu UI to include a settings button.
✅ Acceptance Criteria
🎨 UI Design Suggestions
Simple Approach:
Alternative: Use a slider for FPS instead of buttons
🧪 Testing
FPS Changes:
Visualization Toggle:
Settings Persistence:
💭 Other possible Enhancements
🔗 Related Files
Assets/RealityLog/Scripts/Runtime/Common/CaptureTimer.cs(lines 14-15)Assets/RealityLog/Scripts/Runtime/Depth/DepthPointCloudRenderer.cs(line 27)Assets/RealityLog/Scripts/Runtime/UI/RecordingMenuController.cs(Recording Menu, likely exists)📚 Implementation Notes
Quick Implementation Path:
SetTargetFPS()method toCaptureTimer(~5 lines)SetVisualizationEnabled()method toDepthPointCloudRenderer(~5 lines)Total Time: 1-2 hours