.Net 4.x -> ForEach() Extension amiguous

Issue #356 resolved
Anonymous created an issue

When setting the Target Scripting Runtime to .Net 4.x equivalent in Unity 2018.1.6 (probably already earlier in Unity 2017.3) the OdinGettingStartedWizard doesn't know which extension method to choose since they have the same name:

Assets/Plugins/Sirenix/Odin Inspector/Scripts/Editor/OdinGettingStartedWizard.cs(288,38): error CS0121: The call is ambiguous between the following methods or properties: Sirenix.Utilities.LinqExtensions.ForEach<UnityEngine.GameObject>(this System.Collections.Generic.IEnumerable<UnityEngine.GameObject>, System.Action<UnityEngine.GameObject>)' andSystem.Collections.Generic.CollectionExtensions.ForEach<UnityEngine.GameObject>(this System.Collections.Generic.IEnumerable<UnityEngine.GameObject>, System.Action<UnityEngine.GameObject>)'

I guess you have to check within your Utilities Assembly if it is Using .Net higher than 3.5 - or you rename your ForEach extension methods.

Comments (1)

  1. Tor Esa Vestergaard

    Fixed in Odin 1.1, which is currently in beta. If you want to get in on the beta, send me a mail at tor@sirenix.net with your Odin invoice ID, and I'll send you the latest beta build, and add you to the beta mailing list.

  2. Log in to comment