Topic: Unity Compiling Error - IEnumerable<U> get items function not found

https://fogbugz.unity3d.com/default.asp … nbq0v1h639

Unity has a difficult time compiling abstract classes that implement IEnumerable<U>.

It's a Unity compiling error.  But it might be worth considering refactoring the IEnumerable access pattern.  I went through, and removed the IEnumerable<U> from the code base, and had explicit references to the items properties in all of the examples.  Unity still didn't compile the IL2CPP iOS code correctly. 

Suggestion: consider refactoring the managers implementing IEnumerable (Not necessary if Unity fixes the bug, but may be good for hardening the code, or to be aware of the issue until Unity addresses the issue).

Request:  Please wrap the entire asset in a namespace.  This will be useful for distributing through the package manager, or pre-compiling in an independent solution (not in C-Sharp-First-Pass).  Examples could all be imported as Samples.

Thanks!
(Mostly posting here to track the Unity Bug report)

Re: Unity Compiling Error - IEnumerable<U> get items function not found

Hello.

About IEnumerable:
As far as I understood from your post, you refactored and removed all uses of IEnumerable<U>, but Unity still won't compile it correctly, right?
If so, why make these changes to the asset if it still doesn't solve the problem?

About namespaces:
Online Maps was originally developed for Unity 3.x, where there was no way to put scripts in an assembly other than Assembly-CSharp.
User scripts were created in the global namespace by default.
This means that if there is a script with the same name in some namespace and in the global namespace, then the script in the global namespace will have a higher priority, and the user will have compilation errors.
In Unity 3.x there was only one way to solve this problem - is give unique class names (asset name + class name).
In this case, having namespaces is redundant.

The days of Unity 3.x are long gone and now there is a Plugins folder and assembly definition files and there seems to be no reason to use the old rules.
But no, such a reason is the people who use the asset in their projects.
Adding namespaces and/or changing classes will just break existing projects.
Of course, this will benefit future users, but I cannot forget about current users and I will never do it.

Trust me, I hate these legacy things a lot, and I am seriously thinking about releasing a new mapping asset that will maked using the highest modern standards.
And of course, if I ever do this, everyone who already has Online Maps will get a free or cheap upgrade to the new asset.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Unity Compiling Error - IEnumerable<U> get items function not found

Closing the loop on this, in case others encounter the issue.   

Unity fixed a bug in the Unity Runtime Scene Serialization Package.  ("com.unity.runtime-scene-serialization": "0.2.3-preview")

Unity implemented a fix for the IEnumerable<U> in Unity version 2021.2.0a17.  Although, the fix can be leveraged by directly referencing the above mentioned dependency, for back-porting to 2020.x in my case.

I support the idea of a new mapping asset, and understand how big of an undertaking that would be. 
Thank you for the work you've done on this package.

Re: Unity Compiling Error - IEnumerable<U> get items function not found

There are so many factors working against the release of a new map asset here that I don't think it will ever be released in the foreseeable future.
Instead Online Maps v4 will be released as a separate asset that will not be backwards compatible with v3, will have namespaces, good class names, asmdefs, and the asset will be located in Plugins.
It was actually 95% complete in September, but I've put it aside for now because I'm working on building a big new project outside of Unity.
I was hoping to be able to release it at the end of '23, but for now I don't have time to continue working on it.
So hopefully v4 will be released sometime in 24.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.