File tree Expand file tree Collapse file tree 4 files changed +43
-14
lines changed Expand file tree Collapse file tree 4 files changed +43
-14
lines changed Original file line number Diff line number Diff line change
1
+ <Project >
2
+
3
+ <PropertyGroup >
4
+ <TargetFrameworks >netstandard2.0;netstandard2.1</TargetFrameworks >
5
+ <!-- To be able to make the internals visible, since we're not signing the assembly for Unity -->
6
+ <SignAssembly >false</SignAssembly >
7
+ <DefineConstants >$(DefineConstants);SENTRY_UNITY</DefineConstants >
8
+ </PropertyGroup >
9
+
10
+ <ItemGroup >
11
+ <InternalsVisibleTo Include =" Sentry.Unity" />
12
+ <InternalsVisibleTo Include =" Sentry.Unity.Tests" />
13
+ </ItemGroup >
14
+
15
+ </Project >
Original file line number Diff line number Diff line change
1
+ #if SENTRY_UNITY
2
+
3
+ namespace Sentry ;
4
+
5
+ /// <summary>
6
+ /// Internal Sentry SDK entrypoint.
7
+ /// </summary>
8
+ /// <remarks>
9
+ /// This class is now internal. Use <c>Sentry.Unity.SentrySdk</c> instead.
10
+ /// <para>
11
+ /// To migrate your code:
12
+ /// <list type="number">
13
+ /// <item>Change <c>using Sentry;</c> to <c>using Sentry.Unity;</c></item>
14
+ /// <item>Keep using the <c>SentrySdk</c> API itself - no changes needed to method calls</item>
15
+ /// <item>Add <c>using Sentry;</c> if you need access to types like <c>SentryId</c>, <c>SentryLevel</c>, etc.</item>
16
+ /// </list>
17
+ /// </para>
18
+ /// </remarks>
19
+ internal static partial class SentrySdk ;
20
+
21
+ #endif
Original file line number Diff line number Diff line change 7
7
<AllowUnsafeBlocks >true</AllowUnsafeBlocks >
8
8
</PropertyGroup >
9
9
10
- <PropertyGroup Condition = " '$(SolutionName)' != 'Sentry.Unity' " >
10
+ <PropertyGroup >
11
11
<TargetFrameworks >net9.0;net8.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks >
12
12
<TargetFrameworks Condition =" '$(NO_ANDROID)' == ''" >$(TargetFrameworks);net9.0-android35.0;net8.0-android34.0</TargetFrameworks >
13
13
<TargetFrameworks Condition =" '$(NO_IOS)' == '' And $([MSBuild]::IsOSPlatform('OSX'))" >$(TargetFrameworks);net9.0-ios18.0;net8.0-ios17.0</TargetFrameworks >
14
14
<TargetFrameworks Condition =" '$(NO_MACCATALYST)' == '' And $([MSBuild]::IsOSPlatform('OSX'))" >$(TargetFrameworks);net9.0-maccatalyst18.0;net8.0-maccatalyst17.0</TargetFrameworks >
15
15
</PropertyGroup >
16
-
17
- <PropertyGroup Condition =" '$(SolutionName)' == 'Sentry.Unity'" >
18
- <TargetFrameworks >netstandard2.0;netstandard2.1</TargetFrameworks >
19
- <!-- To be able to make the internals visible, since we're not signing the assembly for Unity -->
20
- <SignAssembly >false</SignAssembly >
21
- </PropertyGroup >
22
-
23
- <ItemGroup Condition =" '$(SolutionName)' == 'Sentry.Unity'" >
24
- <InternalsVisibleTo Include =" Sentry.Unity" />
25
- <InternalsVisibleTo Include =" Sentry.Unity.Tests" />
26
- </ItemGroup >
27
-
16
+
28
17
<!-- Platform-specific props included here -->
29
18
<Import Project =" Platforms\Android\Sentry.Android.props" Condition =" '$(TargetPlatformIdentifier)' == 'android'" />
30
19
<Import Project =" Platforms\Cocoa\Sentry.Cocoa.props" Condition =" '$(TargetPlatformIdentifier)' == 'ios' Or '$(TargetPlatformIdentifier)' == 'maccatalyst'" />
31
20
<Import Project =" Platforms\Native\Sentry.Native.targets"
32
21
Condition =" '$(TargetPlatformIdentifier)' != 'android' and '$(TargetPlatformIdentifier)' != 'ios' and '$(TargetPlatformIdentifier)' != 'maccatalyst'" />
22
+ <Import Project =" Platforms\Unity\Sentry.Unity.props" Condition =" '$(SolutionName)' == 'Sentry.Unity'" />
33
23
34
24
<PropertyGroup Condition =" '$(EnableAot)' == 'true'" >
35
25
<IsAotCompatible >true</IsAotCompatible >
Original file line number Diff line number Diff line change 6
6
7
7
namespace Sentry ;
8
8
9
+ #if ! SENTRY_UNITY
9
10
/// <summary>
10
11
/// Sentry SDK entrypoint.
11
12
/// </summary>
@@ -14,7 +15,9 @@ namespace Sentry;
14
15
/// It allows safe static access to a client and scope management.
15
16
/// When the SDK is uninitialized, calls to this class result in no-op so no callbacks are invoked.
16
17
/// </remarks>
17
- public static partial class SentrySdk
18
+ public
19
+ #endif
20
+ static partial class SentrySdk
18
21
{
19
22
internal static IHub CurrentHub = DisabledHub . Instance ;
20
23
You can’t perform that action at this time.
0 commit comments