Skip to content
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

feat: Package update notification #964

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- Fixed a crash during startup due in connection to the Google Ads Unity package ([#953](https://github.com/getsentry/sentry-unity/pull/953))

### Features

- IL2CPP line number support is enabled by default ([#963](https://github.com/getsentry/sentry-unity/pull/963))

### Dependencies

- Bump Java SDK from v6.4.0 to v6.4.1 ([#954](https://github.com/getsentry/sentry-unity/pull/954))
Expand Down
25 changes: 25 additions & 0 deletions package-dev/Editor/SentryPackageManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#if UNITY_2020_3_OR_NEWER
using UnityEditor;
using UnityEngine;

namespace Sentry.Unity.Editor
{
public static class SentryPackageManager
{
[InitializeOnLoadMethod]
public static void SentryPackageUpdate()
{
UnityEditor.PackageManager.Events.registeredPackages += eventArgs =>
{
if (eventArgs.changedFrom.Count > 0)
{
var from = eventArgs.changedFrom[0];
var to = eventArgs.changedTo[0];

Debug.Log($"Package changed from {from.name}-{from.version} to {to.name}-{to.version}");
}
};
}
}
}
#endif
20 changes: 20 additions & 0 deletions package-dev/Editor/io.sentry.unity.dev.editor.asmdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "io.sentry.unity.dev.editor",
"rootNamespace": "",
"references": [
""
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [
""
],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}