Skip to content

Commit ca691a4

Browse files
authored
Added IsGlobalModeEnabled to SetDefaults (#260)
* added IsGlobalModeEnabled to set defaults (true) * updated CHANGELOG.md
1 parent 9f5822a commit ca691a4

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Features
6+
7+
- Added IsGlobalModeEnabled to SetDefaults ([#260](https://github.com/getsentry/sentry-unity/pull/260))
8+
39
## 0.4.1
410

511
### Fixes

src/Sentry.Unity/SentryOptionsUtility.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public static void SetDefaults(SentryUnityOptions options, IApplication? applica
99
application ??= ApplicationAdapter.Instance;
1010

1111
options.Enabled = true;
12+
options.IsGlobalModeEnabled = true;
1213

1314
options.AutoSessionTracking = true;
1415
options.CaptureInEditor = true;

test/Sentry.Unity.Tests/SentryOptionsUtilityTests.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ namespace Sentry.Unity.Tests
66
{
77
public class SentryOptionsUtilityTests
88
{
9+
[Test]
10+
public void SetDefaults_IsGlobalModeEnabled_IsTrue()
11+
{
12+
var options = new SentryUnityOptions();
13+
14+
SentryOptionsUtility.SetDefaults(options, new TestApplication());
15+
16+
Assert.IsTrue(options.IsGlobalModeEnabled);
17+
}
18+
919
[Test]
1020
public void SetDefaults_Release_IsApplicationProductNameAtVersion()
1121
{

0 commit comments

Comments
 (0)