-
-
Notifications
You must be signed in to change notification settings - Fork 220
ref: Support Unity
as a platfom
#4322
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
base: main
Are you sure you want to change the base?
Conversation
SentrySdk
SentrySdk
Unity
as a platfom
/// <summary> | ||
/// Internal Sentry SDK entrypoint. | ||
/// </summary> | ||
/// <remarks> | ||
/// This class is now internal. Use <c>Sentry.Unity.SentrySdk</c> instead. | ||
/// <para> | ||
/// To migrate your code: | ||
/// <list type="number"> | ||
/// <item>Change <c>using Sentry;</c> to <c>using Sentry.Unity;</c></item> | ||
/// <item>Keep using the <c>SentrySdk</c> API itself - no changes needed to method calls</item> | ||
/// <item>Add <c>using Sentry;</c> if you need access to types like <c>SentryId</c>, <c>SentryLevel</c>, etc.</item> | ||
/// </list> | ||
/// </para> | ||
/// </remarks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only visible to Unity SDK users. The changes here are part of breaking changes to the Unity SDK and this aims to reduce friction when migrating.
@@ -7,29 +7,19 @@ | |||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | |||
</PropertyGroup> | |||
|
|||
<PropertyGroup Condition="'$(SolutionName)' != 'Sentry.Unity'"> | |||
<PropertyGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We no longer need to conditionally set the TF, they get overwritten by the platform .props
on line 22.
This comes from getsentry/sentry-unity#2227
The goal is to provide the Unity SDK a way to "internalize" the .NET SDK. This works because the Unity SDK builds the .NET SDK from source. The relevant changes happen in
SentrySdk.cs
.We noticed the similarity between
Unity
and the platformsAndroid
,iOS
, andNative
. All the Unity specific junk from theSentry.csproj
now goes into its own.props
.To lend the argument "Unity is its own platform" some credibility we dug out some ms docs.
#skip-changelog