-
-
Notifications
You must be signed in to change notification settings - Fork 56
Rework Initialization #2227
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
Rework Initialization #2227
Changes from 3 commits
14427b6
bb4dbc0
0f97f0b
a76e957
e494279
df211a3
19c4e78
00e788a
bfcd0f1
4448334
232833c
bcbb551
deb6aa7
a66a5a6
857e492
eefad70
16c9fcf
6542706
b48e60d
76e05b2
3fa372c
1f5e5cc
83deeec
011ba1d
2a46b5f
7ac68be
43f5ae9
ad0ae02
bb6f80a
c53ccb5
d100d4f
7faafb9
490e033
2f42440
d2709d1
326dc32
1183370
f1388b4
594dc4a
3bfc5fa
0843ba5
a4cbc59
32876ac
c6cbb0c
3a2328b
2e4b3db
99bbb4d
d67b2b9
ac366e7
76868b8
1f520ee
a47872d
e18de6e
d0711f6
e55eae6
f3af761
cab093a
5f4438d
888b28e
4a94b1a
6c72a82
a7ecd95
fb5ef3d
e15752f
febcf57
c2b35be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,7 +86,7 @@ public void SendFeedback() | |
else | ||
{ | ||
// Since there is no screenshot added we can capture the feedback right away | ||
SentryUnity.CaptureFeedback(_description.text, _email.text, _name.text, addScreenshot: false); | ||
SentrySdk.CaptureFeedback(_description.text, _email.text, _name.text, addScreenshot: false); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the desired effect. All things reside within |
||
} | ||
} | ||
|
||
|
@@ -99,7 +99,7 @@ private IEnumerator HideFormAndCaptureFeedback() | |
// We're waiting for the EndOfFrame so the FeedbackForm gets updated before capturing the screenshot | ||
yield return new WaitForEndOfFrame(); | ||
|
||
SentryUnity.CaptureFeedback(_description.text, _email.text, _name.text, addScreenshot: true); | ||
SentrySdk.CaptureFeedback(_description.text, _email.text, _name.text, addScreenshot: true); | ||
|
||
ResetUserFeedback(); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System; | ||
|
||
namespace Sentry.Unity.NativeUtils; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Putting the services into a very distinctive namespace to "discourage" usage. |
||
|
||
public static class SentryPlatformServices | ||
{ | ||
public static ISentryUnityInfo? UnityInfo { get; set; } | ||
public static Action<SentryUnityOptions, ISentryUnityInfo>? PlatformConfiguration { get; set; } | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
using System.Collections.Generic; | ||
using Sentry.Extensibility; | ||
using Sentry.Unity.Integrations; | ||
using Sentry.Unity.NativeUtils; | ||
using UnityEngine; | ||
|
||
namespace Sentry.Unity; | ||
|
@@ -120,12 +121,12 @@ public static string GetConfigPath(string? notDefaultConfigName = null) | |
/// <remarks> | ||
/// Used for loading the SentryUnityOptions from the ScriptableSentryUnityOptions during runtime. | ||
/// </remarks> | ||
public static SentryUnityOptions? LoadSentryUnityOptions(ISentryUnityInfo unityInfo) | ||
public static SentryUnityOptions? LoadSentryUnityOptions() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We no longer need to provide the |
||
{ | ||
var scriptableOptions = Resources.Load<ScriptableSentryUnityOptions>($"{ConfigRootFolder}/{ConfigName}"); | ||
if (scriptableOptions is not null) | ||
{ | ||
return scriptableOptions.ToSentryUnityOptions(false, unityInfo); | ||
return scriptableOptions.ToSentryUnityOptions(false, SentryPlatformServices.UnityInfo); | ||
} | ||
|
||
return null; | ||
|
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 can safely make this
internal
. The SDK ships with it's own.asmdef
that allows us to hide internal types from the user.