Repository navigation
feat(samples): Facelift for unity-of-bugs - #2958
Merged
Merged
Conversation
Contributor
|
bitsandfoxes
marked this pull request as ready for review
November 24, 2026 16:34
bitsandfoxes
force-pushed
the
spire/unity-of-bugs-facelift
branch
from
November 25, 2026 10:49
ce132d6 to
c70c873
Compare
The six sample scenes become one scene, BugFarm, whose menu is built from code out of a catalogue of samples with stable IDs (errors/capture-message, crashes/native-c, ...). The menu fits landscape and portrait, keeps clear of the safe area and the feedback button, and greys out samples that can't run in the current build or would crash the Editor. ExtraScene is the target of the scene-loading samples, loaded single, additively or asynchronously. A build runs a sample on its own when launched with `sample=<id>` (and an optional `run_id=<id>`, set as the `sample.run_id` tag): it logs the catalogue, runs the sample, flushes and quits. Without the argument the app stays open. Debug symbol upload reads its auth token from SENTRY_AUTH_TOKEN in the environment the Editor or the build was started from, and is off without it. Android builds target ARM64 only.
scripts/run-sample.ps1 builds and installs Unity of Bugs on an Android or iOS device, emulator or simulator, runs catalogue samples through launch arguments with a run ID, and finds what each sent in Sentry by that ID: arrival, symbolication and context, with a Markdown report. build-sample.ps1 takes -IosSdk Device|Simulator. The sample runs several comma-separated IDs in one launch, and its scene samples finish once the scene has loaded. docs/agent-guides/devices.md covers the workflow.
…ple.ps1 The project's event list ignores tag queries, so a run's events are found through the issues the sample.run_id tag matches. -Build prints the sentry-cli upload summary from the Gradle log or the Xcode build phase's log. build-sample.ps1 reads script eval's return value from its result.
…nches the phone refuses
… iOS Simulator SampleOptionConfiguration extends SentryOptionConfiguration with the watchdog termination option the out-of-memory sample needs, and the options asset points to it. run-sample.ps1 skips the out-of-memory sample on a simulator, which has no iOS memory limit, and counts frames from the simulator runtime's system libraries as system frames.
…ubclass in the package snapshot
… and use Sentry's colours
… fix the out-of-memory wording
bitsandfoxes
force-pushed
the
spire/unity-of-bugs-facelift
branch
from
November 25, 2026 12:31
ae12a7b to
b0f3fd7
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b0f3fd7. Configure here.
bitsandfoxes
requested review from
a team,
jpnurmi,
limbonaut and
tustanivsky
November 25, 2026 13:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Unity of Bugs spreads its samples over six scenes with big buttons. The feedback widget's button covers "Close Game". On a phone, the sample is awkward to use, and it looks rough in screenshots and session replays.
How
The sample opens on one scene,
BugFarm, which shows a catalogue of SDK samples in Sentry's colours.ExtraScene, so the scene manager integration still gets exercised.BugFarmandExtraSceneare the sample's only scenes.The sample's scripts are split by what a reader is looking for, and
Scripts/README.mdexplains the layout:Scripts/:SentryOptionConfiguration.cs,SampleOptionConfiguration.csandSentryCliConfiguration.cs.Scripts/Samples/shows the SDK usage: one file per tab (ErrorSamples.cs,CrashSamples.cs, …) and the "Run on" helper. The C, C++, Objective-C, Kotlin and JavaScript plugins the native samples call, with their C# bridge, are inSamples/NativePlugins/.Scripts/Scaffolding/holds the app around the samples: the menu, its UI, the runner and status line, the list of tabs, the extra scene, the logo and the input-module helper.How it's built:
SampleCataloguelists the categories in menu order.crashes/native-c. The menu names its rows by it, and the log prints it when a sample runs.SentryLogo.mat, in the menu's accent colour. The material names its shader, so player builds include the shader without relying on the project's always-included shaders. If the material can't load, the logo keeps its default look and a warning is logged.NSExceptionwithraise. Unity's Xcode project builds with Objective-C exceptions off, and@throwneeds them on.BugFarmandExtraScene. The package snapshot and the plugin platform test name the scripts' paths.Caveats
IosWatchdogTerminationIntegrationEnabled, which is off by default in the SDK. The out-of-memory sample's result needs it. The sample's description and the code comment inSampleOptionConfiguration.cssay so. It is the sample's only change from the SDK's default options.Scripts/Scaffolding/Resources/, so a project that imports the sample builds both in.