Skip to content

Conversation

bitsandfoxes
Copy link
Contributor

Fixes #2247

Since the native configuration now gets called from within the SDK it does not need to be pulled out into Android.Configure and can universally be the first thing the SDK does.

This works because Init is getting automatically called in SentryInitialization.cs

private static void Init()
{
// We're setting up `UnityInfo` and the platform specific configure callbacks as the very first thing.
// These are required to be available during initialization.
SetUpPlatformServices();
// Loading the options invokes the ScriptableOption`Configure` callback. Users can disable the SDK via code.
var options = ScriptableSentryUnityOptions.LoadSentryUnityOptions();
if (options != null && options.ShouldInitializeSdk())
{
SentrySdk.Init(options);
}
else
{

#skip-changelog

@bitsandfoxes bitsandfoxes marked this pull request as ready for review August 14, 2025 14:48
@limbonaut
Copy link
Collaborator

LGTM

@bitsandfoxes bitsandfoxes merged commit 7673311 into main Aug 25, 2025
345 of 359 checks passed
@bitsandfoxes bitsandfoxes deleted the fix/collect-main-tread-data branch August 25, 2025 09:43
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.

MainThreadData.CollectData is getting called twice
2 participants