Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SentryMonoBehavior instance being removed on scene switch in WebGL #1754

Merged
merged 4 commits into from
Aug 12, 2024

Conversation

tustanivsky
Copy link
Collaborator

This PR adds DontDestroyOnLoad call to SentryMonoBehavior.Awake to ensure its instance won't be destroyed during the scene switch in WebGL builds.

Closes #1678

src/Sentry.Unity/SentryMonoBehaviour.cs Outdated Show resolved Hide resolved
@bitsandfoxes bitsandfoxes merged commit 9b749d4 into main Aug 12, 2024
6 of 9 checks passed
@bitsandfoxes bitsandfoxes deleted the fix/webgl-scene-switch branch August 12, 2024 10:05
Copy link
Contributor

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Fix `SentryMonoBehavior` instance being removed on scene switch in WebGL ([#1754](https://github.com/getsentry/sentry-unity/pull/1754))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against f0f8266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Events not captured from Unity WebGL build after scene change
2 participants