+1
Fixed

Ambigurous Match Found Unity 2021.2.2f1

Andrew Scott 3 weeks ago updated by Lazlo Bonin (Lead Developer) 1 week ago 3

As the subject says. Error below.

I also reported a bug with Unity 2020.2, because they made changes to how the package manager works as well. When I install Peek, the Package Manager thinks it is not installed, Unity seems to have not gotten back to me on this and it has been a good 8 months since reporting this.

Image attached to show what I mean.

If you also go to packages in project, it will not show up there either.

AmbiguousMatchException: Ambiguous match found.
System.RuntimeType.GetMethodImplCommon (System.String name, System.Int32 genericParameterCount, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConv, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) (at :0)
System.RuntimeType.GetMethodImpl (System.String name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConv, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) (at :0)
System.Type.GetMethod (System.String name, System.Reflection.BindingFlags bindingAttr) (at :0)
Ludiq.OdinSerializer.Utilities.Editor.AssemblyImportSettingsUtilities..cctor () (at C:/Users/lazlo/Projects/LudiqOdinSerializer/OdinSerializer/Utilities/Misc/AssemblyImportSettingsUtilities.cs:86)
Rethrow as TypeInitializationException: The type initializer for 'Ludiq.OdinSerializer.Utilities.Editor.AssemblyImportSettingsUtilities' threw an exception.
Ludiq.OdinSerializer.Utilities.Editor.OdinBuildAutomation.OnPreprocessBuild () (at Assets/Ludiq/Ludiq.PeekCore/Runtime/Dependencies/OdinSerializer/OdinBuildAutomation.cs:60)
Ludiq.OdinSerializer.Utilities.Editor.OdinPreBuildAutomation.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at Assets/Ludiq/Ludiq.PeekCore/Runtime/Dependencies/OdinSerializer/OdinBuildAutomation.cs:113)
UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass16_0.b__1 (UnityEditor.Build.IPreprocessBuildWithReport bpp) (at :0)
UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List`1[T] oneInterfaces, System.Action`1[T] invocationOne, System.Collections.Generic.List`1[T] twoInterfaces, System.Action`1[T] invocationTwo, System.Boolean exitOnFailure) (at :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Unity Version:
2021.2.2f1
Peek Version:
1.4.1

I am encountering this error when trying to build

Looking into it, it might be related to AssemblyImportSettingsUtilities.cs, line:

private static MethodInfo getScriptingBackendMethod = typeof (PlayerSettings).GetMethod("GetScriptingBackend", BindingFlags.Static | BindingFlags.Public);

GetScriptingBackend now has two versions in 2021.2.2/3. https://docs.unity3d.com/2021.2/Documentation/ScriptReference/PlayerSettings.GetScriptingBackend.html. Also, methods using BuildTargetGroup seem to be marked for depreciation

It's difficult for me to fix this myself since this is a precompiled dll. Can you look into it and update when you have a fix? Thanks

Pending Review

Sorry for the bug and thanks for the report.

I'll look into this today. In fact, I was already thinking about removing the entire Odin pre-build automation part of Peek because it's unnecessary and only bloats build times, so I might fix it inadvertendly.

Fixed

Hi! This should be fixed in Peek v.1.4.2, which has been submitted for review.

Note that this fix required us deleting some files from the plugin. Therefore, in order to work, you'll need to delete the Ludiq/ folder before reimporting the newer version.