0
Unity Bug

Warning - Failed to analyse assembly UnityEditor.Advertisements

Daniel 5 months ago updated 4 months ago 5

Hi,

There's a warning that keeps popping up in Unity Editor...


Failed to analyze assembly 'UnityEditor.Advertisements, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null':

System.MissingMethodException: void UnityEngine.UnityAPICompatibilityVersionAttribute..ctor(string,string[])

at (wrapper managed-to-native) System.MonoCustomAttrs.IsDefinedInternal(System.Reflection.ICustomAttributeProvider,System.Type)

at System.MonoCustomAttrs.IsDefined (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inherit) [0x00027] in <437ba245d8404784b9fbab9b439ac908>:0

at System.Reflection.Assembly.IsDefined (System.Type attributeType, System.Boolean inherit) [0x00000] in <437ba245d8404784b9fbab9b439ac908>:0

at System.Attribute.IsDefined (System.Reflection.Assembly element, System.Type attributeType, System.Boolean inherit) [0x0005c] in <437ba245d8404784b9fbab9b439ac908>:0

at System.Attribute.IsDefined (System.Reflection.Assembly element, System.Type attributeType) [0x00000] in <437ba245d8404784b9fbab9b439ac908>:0

at Ludiq.PeekCore.Codebase.IsEditorAssembly (System.Reflection.Assembly assembly) [0x00001] in E:\Portal\Unity\UnityProjects\Portal\Assets\Ludiq\Ludiq.PeekCore\Editor\Reflection\Codebase.cs:236

at Ludiq.PeekCore.Codebase.IsEditorDependentAssembly (System.Reflection.Assembly assembly) [0x00001] in E:\Portal\Unity\UnityProjects\Portal\Assets\Ludiq\Ludiq.PeekCore\Editor\Reflection\Codebase.cs:254

at Ludiq.PeekCore.Codebase.IsRuntimeAssembly (System.Reflection.Assembly assembly) [0x00001] in E:\Portal\Unity\UnityProjects\Portal\Assets\Ludiq\Ludiq.PeekCore\Editor\Reflection\Codebase.cs:249

at Ludiq.PeekCore.Codebase..cctor () [0x000ba] in E:\Portal\Unity\UnityProjects\Portal\Assets\Ludiq\Ludiq.PeekCore\Editor\Reflection\Codebase.cs:40

UnityEngine.Debug:LogWarning(Object)

Ludiq.PeekCore.Codebase:.cctor() (at Assets/Ludiq/Ludiq.PeekCore/Editor/Reflection/Codebase.cs:107)

Ludiq.PeekCore.PluginContainer:Initialize() (at Assets/Ludiq/Ludiq.PeekCore/Editor/Plugins/PluginContainer.cs:110)

Ludiq.PeekCore.PluginContainer:.cctor() (at Assets/Ludiq/Ludiq.PeekCore/Editor/Plugins/PluginContainer.cs:21)

UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes(Type[])

Unity Version:
2019.3.13f1
Peek Version:
1.1.8
Unity Bug

Hi Daniel,

This appears to be a Unity issue that appeared in 2019.3.10f1. Can you update your Unity to 2019.3.15f1 and see if it is resolved? It seems like the issue persists in 2019.3.15f1.

https://issuetracker.unity3d.com/issues/scripting-missingmethodexception-errors-are-thrown-on-selecting-object-after-updating-the-api

I've submitted an updated bug report to Unity, as I can reproduce it on the latest versions of Unity and the Ads package, and it's definitely on their end.

https://fogbugz.unity3d.com/default.asp?1253860_a4dsgqgdl8ckd3fo

If you don't need ads in your project, you can remove UnityEngine.Advertisements from your dependencies in the mean time.

Otherwise, I don't believe this should affect Peek's functionality in any way.

I will update this bug report as I hear back from Unity.

Hey Lazlo,

Thanks for the follow-up! I removed UnityEngine.Advertisements since I don't need it.

Ok great sounds good!

Daniel

+1

Hi Daniel,

I just heard back from Unity and this issue has been fixed in version 3.4.7+ of the Advertisements package. I can confirm the error no longer appears here on Unity 2019.4.1f1 + Advertisements 3.4.7 + Peek 1.1.8.

Hey Lazlo,

Ah, that's great news! Thanks for the follow-up!

Daniel