You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+
## Project Overview
6
+
7
+
This is a Unity plugin for BetaHub bug reporting that enables in-game bug submissions with video recording, screenshot capture, and log collection. The plugin is distributed as a Unity Package Manager (UPM) package.
8
+
9
+
## Architecture
10
+
11
+
### Core Components
12
+
13
+
-**GameRecorder** (`Runtime/Scripts/GameRecorder.cs`): Handles video recording using FFmpeg with optimized GPU-based capture
14
+
-**BugReportUI** (`Runtime/Scripts/BugReportUI.cs`): Main UI component for bug report submission form
15
+
-**Issue** (`Runtime/Scripts/Issue.cs`): Data model representing bug reports and their upload state
16
+
-**VideoEncoder** (`Runtime/Scripts/VideoEncoder.cs`): FFmpeg wrapper for video encoding with segmented recording
17
+
-**Process Wrappers**: Platform-specific process handling for FFmpeg
18
+
-**IProcessWrapper** (`Runtime/Scripts/IProcessWrapper.cs`): Interface for process abstraction
This project follows Unity Package Manager conventions:
45
+
-`package.json`: Package metadata and dependencies
46
+
-`Runtime/`: Runtime scripts and assets
47
+
-`Editor/`: Editor-only scripts
48
+
-`Samples~/`: Sample scenes and scripts
49
+
- Assembly definition files (`.asmdef`) organize code into separate assemblies
50
+
51
+
### Testing
52
+
53
+
The plugin includes a working demo scene in `Samples~/ExampleScene/` with:
54
+
- Sample scene setup
55
+
- Example integration with `RotateCube.cs` script
56
+
- Pre-configured demo project settings for immediate testing
57
+
58
+
### FFmpeg Integration
59
+
60
+
The plugin automatically downloads FFmpeg binaries through the editor script `FfmpegDownloader.cs`. Video recording is implemented with:
61
+
- Segmented recording (10-second segments, 60-second rolling window)
62
+
- GPU-optimized capture using RenderTextures
63
+
- Cross-platform process wrapper abstraction
64
+
- Error handling and retry logic for file operations
65
+
66
+
## Configuration
67
+
68
+
### Required Settings for IL2CPP
69
+
70
+
When building with IL2CPP scripting backend:
71
+
1. Define `ENABLE_BETAHUB_FFMPEG` in Player Settings > Scripting Define Symbols
72
+
2. Ensure native process wrapper libraries are included in build
73
+
74
+
### Demo Project
75
+
76
+
The plugin comes pre-configured with demo project credentials (`DEMO_PROJECT_ID = "pr-5287510306"`) for immediate testing. Reports submitted to the demo project are only visible to the submitter via email links.
77
+
78
+
## Development Notes
79
+
80
+
- Do not generate meta files, let Unity do this
81
+
- Use `ruby validate_prefab.rb <prefab_path>` to validate Unity prefabs for duplicate IDs and broken references
0 commit comments