getsentry / sentry-unity

Development of Sentry SDK for Unity
https://docs.sentry.io/platforms/unity/
MIT License
217 stars 52 forks source link

Windows Native: Add call to sentry_init in the main function at compile time #628

Open bruno-garcia opened 2 years ago

bruno-garcia commented 2 years ago

Follow up from #527

The Native SDK is currently initialized via C# (after the Unity C# layer runs). It works well to capture crashes after the game boots properly. The one downside is that we don't capture crashes of the engine bootstrapping itself. Our docs are written to indicate it works this way because we built it like that for Android and iOS.

Until this task is completed we need to update the docs to mention the early crash detection is for mobile only.

bruno-garcia commented 2 years ago

https://github.com/getsentry/sentry-unity/issues/527#issuecomment-1064117119

bruno-garcia commented 2 years ago

PR tackling #622

vaind commented 2 years ago

This is on hold now, @bitsandfoxes can you please add a comment with details/status and move to "blocked" or "backlog" in the project? We may also need to update the priority

bitsandfoxes commented 2 years ago

We've got a draft exploring how we'd make it work https://github.com/getsentry/sentry-unity/pull/622 Unity ships with pre-built playback engines but provides the source code. The idea is to add Sentry Native to the playback engine and build it ourselves. Why we're currently not going forward with this: The draft relies on finding the correct package to locate vswhere to locate msbuild and there is a whole lot of uncertainty and risk with this approach.

Maybe we could do it like Unity and ship with pre-built playback engines and provide the source for signing?