Hello,
I am trying to build the addressables (I have a few localization tables set up) but I get the following error:
error Packages\io.sentry.unity@0.6.0\Runtime\SentryInitialization.cs(27,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’.
When I remove the Sentry package it works fine. The code that fails on line 27 looks like the following:
Sentry code
#if !UNITY_EDITOR
#if UNITY_IOS
#define SENTRY_NATIVE_IOS
#elif UNITY_ANDROID
#define SENTRY_NATIVE_ANDROID
#endif
#endif
using UnityEngine;
using UnityEngine.Scripting;
#if SENTRY_NATIVE_IOS
using Sentry.Unity.iOS;
#elif UNITY_ANDROID
using Sentry.Unity.Android;
#endif
[assembly: AlwaysLinkAssembly]
namespace Sentry.Unity
{
public static class SentryInitialization
{
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
public static void Init()
{
var options = ScriptableSentryUnityOptions.LoadSentryUnityOptions();
if (options.ShouldInitializeSdk())
{
#if SENTRY_NATIVE_IOS
SentryNativeIos.Configure(options);
#elif SENTRY_NATIVE_ANDROID
SentryNativeAndroid.Configure(options);
#endif
SentryUnity.Init(options);
}
}
}
}
Instead of importing the Sentry via the package manager I imported it manually by placing it in the Packages folder, which will then allow me to modify the package contents. However, there is no assembly called ‘UnityEngine’, only everything else derived from it.
Building the addressables does work in a Mac editor though.
Unity version: 2021.1.25f1.
Addressables version: 1.19.9
Localization: 1.0.3
Any ideas what could be the issue here?