using System;
namespace BugReporter
{
///
/// Settings handed to . Everything has a sane default except
/// and , which identify your project's ingest function.
///
[Serializable]
public class BugReporterConfig
{
/// Per-project write-only key. Safe to embed in a dev build; revocable from the dashboard.
public string ApiKey;
/// HTTPS ingest endpoint, e.g. https://us-central1-<project>.cloudfunctions.net/report
public string Endpoint;
/// Shown on every issue so you know which build the tester was on. Defaults to Application.version.
public string BuildVersion;
///
/// Which game this report belongs to. One project (one API key) can host many games — set this so the
/// dashboard can group/filter issues per game instead of one mixed pile. Value here is the starting
/// game; call at runtime whenever the active game changes.
///
public string GameId;
///
/// Master switch. Leave as Debug.isDebugBuild so the reporter can never reach a release build —
/// the overlay button, the log hook and the network calls all hang off this.
///
public bool Enabled = true;
/// How many of the most recent log lines travel with a report.
public int LogBufferSize = 200;
///
/// Capture Debug.LogWarning lines in the log buffer. Off by default: warnings routinely flood the
/// buffer with 100+ lines of noise and push the actual error out of the ring. Errors, asserts and
/// exceptions are always captured regardless.
///
public bool IncludeWarnings = false;
/// Draw the floating report button. Off if you want to trigger reports from your own UI.
public bool ShowReportButton = true;
/// JPEG quality for the attached screenshot (1-100). 60 keeps a 1080p frame near 150 KB.
public int ScreenshotQuality = 60;
/// Reports that fail to send are written to disk and retried on the next launch.
public bool QueueFailedReports = true;
// ── Clip recording (the last few seconds of gameplay as a low-fps "flipbook") ────────────────────
// OFF by default: it captures the screen continuously, which is a real (if small) perf/battery cost —
// keep it to tester builds. Requires async GPU readback (most modern devices); silently no-ops without.
/// Record a rolling clip of the last and attach it to reports.
public bool RecordClip = false;
/// How many seconds of gameplay the rolling clip keeps. Shorter + smoother beats long + choppy.
public int ClipSeconds = 12;
/// Frames captured per second (1–15). Below ~10 the clip is too choppy to read; 12 is watchable.
public int ClipFps = 12;
/// Clip frame width in pixels (height follows the aspect). Under ~400 the UI/ball is unreadable.
public int ClipMaxWidth = 480;
/// JPEG quality for clip frames (1–100).
public int ClipQuality = 55;
///
/// Hard cap on the uploaded clip. A clip bigger than the server's request limit gets the whole report
/// rejected (413) — logs and screenshot included — so the clip is trimmed to fit instead: the OLDEST
/// seconds are dropped and the moments just before the report are kept. Raising ClipSeconds past what
/// fits here buys nothing but RAM.
///
public int ClipMaxBytes = 8 * 1024 * 1024;
///
/// Flip clip frames vertically. Screen capture into a RenderTexture keeps the framebuffer's native
/// orientation, which is upside-down on top-origin APIs (Metal, D3D, Vulkan) and upright on OpenGL —
/// so this is auto-detected per device by default. Set true/false only to override a wrong guess.
///
public bool? ClipFlipY = null;
}
}