Migration Guide
Migrating From 0.3.0 or earlier
The Sentry SDK deprecated the use of a JSON file to store the options in favor of scriptable objects. If you're migrating from version 0.3.0 or older, make sure to upgrade to version 0.15.0 first, as it is the last version supporting your options stored as JSON. When you're opening the Sentry configuration editor window, that file will be automatically converted into a scriptable object. This support will be dropped in version 0.16.0 and going forward.
Migrating to 0.11.0
Programmatic Configuration Changes
You no longer need to to call SentryUnity.Init
. Instead, you can let the SDK self-initialize and modify the options taken from the Sentry Unity editor configuration window by providing a ScriptableOptionsConfiguration
object.
- Open the Sentry Unity editor configuration window.
- Go to the
Options Config
tab. - Click
Create options configuration
.- This will prompt you to pick a location for your version of the scriptable options configuration script.
- It will also create an instance of the ScriptableOptionsConfiguration and set in it the configuration window.
- Add your code to the newly created script.
Learn more in our options documentation.
Migrating From sentry.unity.lite
to sentry.unity
The Sentry Unity Lite SDK is deprecated for mobile, desktop, WebGL, and console players. Customers using Unity 5.x can still use the Sentry Unity Lite as it continues to be compatible with sentry.io.
The updated Sentry Unity SDK requires Unity version 2019.4 or higher with .NET Standard 2.0 scripting profile.
- Remove the old
Sentry.cs
andSentrySdk.cs
files from your project. - Remove the old initialization code
gameObject.AddComponent<SentrySdk>().Dsn = "___PUBLIC_DSN___";
. - Install the new Sentry Unity SDK.
- Calls to the API such as
SentrySdk.CaptureMessage("Test event");
will continue to work and don't require any change. - Browse the documentation to learn more about the new capabilities of the SDK such as enriching events, performance monitoring and configuration.
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) to suggesting an update ("yeah, this would be better").
- Package:
- upm:sentry-unity
- Version:
- 0.19.0
- Repository:
- https://github.com/getsentry/sentry-unity