-
-
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
Merged
Merged
Rework Initialization #2227
Changes from 52 commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
14427b6
initial working implementation
bitsandfoxes bb4dbc0
fixed using in smoketester
bitsandfoxes 0f97f0b
we actually need both. idk if that's great. doesn't look great
bitsandfoxes a76e957
bumped .NET to have the comment
bitsandfoxes e494279
Updated CHANGELOG.md
bitsandfoxes df211a3
bumped to cleaned up version of .NET
bitsandfoxes 19c4e78
added services logging to init
bitsandfoxes 00e788a
added summary to platformservices
bitsandfoxes bfcd0f1
fixed namespaces
bitsandfoxes 4448334
cleaned up bugfarmbuttons
bitsandfoxes 232833c
namespace clean followup
bitsandfoxes bcbb551
fixed qualification
bitsandfoxes deb6aa7
moved scenetracing integration into the SDK
bitsandfoxes a66a5a6
updated CI to 2020
bitsandfoxes 857e492
env bump
bitsandfoxes eefad70
removed now redundant test
bitsandfoxes 16c9fcf
bumped uniy-of-bugs to 2020
bitsandfoxes 6542706
updated the package
bitsandfoxes b48e60d
removed now redundant asmdef
bitsandfoxes 76e05b2
Updated CHANGELOG.md
bitsandfoxes 3fa372c
missing option field?
bitsandfoxes 1f5e5cc
merged unity 2019 drop
bitsandfoxes 83deeec
finished fixing the startup tracing
bitsandfoxes 011ba1d
merged main
bitsandfoxes 2a46b5f
bump android API level to 21 for 2020
bitsandfoxes 7ac68be
Merge branch 'fix/android-2020-ci' into fix/initialization
bitsandfoxes 43f5ae9
updated test to ignore harmless warning
bitsandfoxes ad0ae02
move startup tracing into the SDK
bitsandfoxes bb6f80a
.
bitsandfoxes c53ccb5
fix naming
bitsandfoxes d100d4f
Format code
getsentry-bot 7faafb9
added tests
bitsandfoxes 490e033
merged
bitsandfoxes 2f42440
Format code
getsentry-bot d2709d1
updated snapshot
bitsandfoxes 326dc32
Merge branch 'chore/cleanup-init' of https://github.com/getsentry/sen…
bitsandfoxes 1183370
.
bitsandfoxes f1388b4
merged the init cleanup
bitsandfoxes 594dc4a
fixed test
bitsandfoxes 3bfc5fa
use platform services where applicable
bitsandfoxes 0843ba5
forgot webgl
bitsandfoxes a4cbc59
rename setup platform services
bitsandfoxes 32876ac
public close cutback
bitsandfoxes c6cbb0c
review
bitsandfoxes 3a2328b
Format code
getsentry-bot 2e4b3db
Merge branch 'main' into chore/cleanup-init
bitsandfoxes 99bbb4d
Merge branch 'chore/cleanup-init' into fix/initialization
bitsandfoxes d67b2b9
Merge branch 'fix/initialization' of https://github.com/getsentry/sen…
bitsandfoxes ac366e7
Update CHANGELOG.md
bitsandfoxes 76868b8
merged main
bitsandfoxes 1f520ee
hold platformservices in options and handle tests
bitsandfoxes a47872d
Format code
getsentry-bot e18de6e
reworked the platform services into the options and fixed the tests
bitsandfoxes d0711f6
Format code
getsentry-bot e55eae6
provide test fallback for platform services
bitsandfoxes f3af761
Merge branch 'fix/initialization' of https://github.com/getsentry/sen…
bitsandfoxes cab093a
sadly, need an editor hook otherwise unhappy times ahead
bitsandfoxes 5f4438d
updated snapshot
bitsandfoxes 888b28e
testplatfromservices are needed
bitsandfoxes 4a94b1a
editor stuff needs its own asmdef
bitsandfoxes 6c72a82
need the asmdef in the 'package' due to name
bitsandfoxes a7ecd95
updated snapshot
bitsandfoxes fb5ef3d
fix meta files
bitsandfoxes e15752f
another round of fixing asmdefs
bitsandfoxes febcf57
added the dev.runtime.asmdef.meta because now it's getting referenced
bitsandfoxes c2b35be
too eager with removing the check
bitsandfoxes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
samples/unity-of-bugs/Assets/Scripts/NativeSupport/NativeButtons.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
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. |
||
|
||
/// <summary> | ||
/// These are SDK's services that are only available at runtime and cannot be baked into the SDK. The | ||
/// <c>SentryInitialization.cs</c> is provided as <c>.cs</c> and gets compiled with the game. It sets <c>IUnityInfo</c> | ||
/// and the <c>PlatformConfiguration</c> callback during the game's startup so that they are available during initializtion. | ||
/// </summary> | ||
/// <remarks>Consider this <c>internal</c>.</remarks> | ||
public static class SentryPlatformServices | ||
{ | ||
private static ISentryUnityInfo? _unityInfo; | ||
|
||
/// <summary> | ||
/// The UnityInfo holds methods that rely on conditionally compilation, i.e. IL2CPP backend. | ||
/// </summary> | ||
public static ISentryUnityInfo UnityInfo | ||
bitsandfoxes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
get => _unityInfo ?? throw new InvalidOperationException("UnityInfo is null."); | ||
bitsandfoxes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
set | ||
{ | ||
if (_unityInfo != null) | ||
{ | ||
throw new InvalidOperationException("Should not set twice. lol."); | ||
bitsandfoxes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
_unityInfo = value; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// The PlatformConfiguration callback is responsible for configuring the native SDK and setting up scope sync. | ||
/// </summary> | ||
public static Action<SentryUnityOptions>? PlatformConfiguration { get; set; } | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.