Skip to content

Commit

Permalink
just a bunch of whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsandfoxes committed Oct 27, 2023
1 parent 4a5345f commit 99eee56
Showing 1 changed file with 47 additions and 14 deletions.
61 changes: 47 additions & 14 deletions package-dev/Runtime/SentryInitialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static void Init()
#elif SENTRY_NATIVE_ANDROID
SentryNativeAndroid.Configure(options, sentryUnityInfo);
#elif SENTRY_NATIVE
SentryNative.Configure(options);
SentryNative.Configure(options, sentryUnityInfo);
#elif SENTRY_WEBGL
SentryWebGL.Configure(options);
#endif
Expand Down Expand Up @@ -273,22 +273,55 @@ private static void Il2CppNativeStackTraceShim(IntPtr exc, out IntPtr addresses,
public bool IsKnownPlatform()
{
var platform = Application.platform;
return platform == RuntimePlatform.Android ||
platform == RuntimePlatform.IPhonePlayer ||
platform == RuntimePlatform.WindowsEditor ||
platform == RuntimePlatform.WindowsPlayer ||
platform == RuntimePlatform.OSXEditor ||
platform == RuntimePlatform.OSXPlayer ||
platform == RuntimePlatform.LinuxEditor ||
platform == RuntimePlatform.LinuxPlayer ||
platform == RuntimePlatform.WebGLPlayer
var known =
platform == RuntimePlatform.Android ||
platform == RuntimePlatform.IPhonePlayer ||
platform == RuntimePlatform.WindowsEditor ||
platform == RuntimePlatform.WindowsPlayer ||
platform == RuntimePlatform.OSXEditor ||
platform == RuntimePlatform.OSXPlayer ||
platform == RuntimePlatform.LinuxEditor ||
platform == RuntimePlatform.LinuxPlayer ||
platform == RuntimePlatform.WebGLPlayer
#if UNITY_2021_3_OR_NEWER
||
platform == RuntimePlatform.LinuxServer ||
platform == RuntimePlatform.WindowsServer ||
platform == RuntimePlatform.OSXServer
||
platform == RuntimePlatform.WindowsServer ||
platform == RuntimePlatform.OSXServer ||
platform == RuntimePlatform.LinuxServer
#endif
;

Console.WriteLine("Is known platform: " + known);
return known;
}

public bool IsNativeSupportEnabled(SentryUnityOptions options, RuntimePlatform platform)
{
Console.WriteLine("is native support enabled?");

switch (platform)
{
case RuntimePlatform.Android:
return options.AndroidNativeSupportEnabled;
case RuntimePlatform.IPhonePlayer:
return options.IosNativeSupportEnabled;
case RuntimePlatform.WindowsPlayer:
return options.WindowsNativeSupportEnabled;
case RuntimePlatform.OSXPlayer:
return options.MacosNativeSupportEnabled;
case RuntimePlatform.LinuxPlayer:
return options.LinuxNativeSupportEnabled;
#if UNITY_2021_3_OR_NEWER
case RuntimePlatform.WindowsServer:
return options.WindowsNativeSupportEnabled;
case RuntimePlatform.OSXServer:
return options.MacosNativeSupportEnabled;
case RuntimePlatform.LinuxServer:
return options.LinuxNativeSupportEnabled;
#endif
default:
return false;
}
}
}
}

0 comments on commit 99eee56

Please sign in to comment.