getsentry / sentry-unity

Development of Sentry SDK for Unity
https://docs.sentry.io/platforms/unity/
MIT License
218 stars 52 forks source link

IL2CPP scripting backend breaks AssetBundle builds #981

Closed z4gon closed 2 years ago

z4gon commented 2 years ago

Environment

How do you use Sentry? Sentry SaaS (sentry.io)

Which version of the SDK? 0.23.0

How did you install the package? (Git-URL, Assetstore) Git-URL

Which version of Unity? 2021.3.10f1 lts apple silicon

Is this happening in Unity (editor) or on a player like Android, iOS, Windows? Unity Editor

Steps to Reproduce

Expected Result

Asset Bundles are built ok

Actual Result

Build fails with error:

Library/PackageCache/io.sentry.unity@917dfa35b1/Runtime/SentryInitialization.cs(47,56): error CS0012: The type 'ScriptableObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.

Any logs or screenshots

screenshot

z4gon commented 2 years ago

After investigating a bit more, this seems to be fixed by insatlling IL2CPP support for standalone builds.