Hey there,
I wanted to test this out and get a feel for what it could bring to my project, but unfortunately, I received an error right off the bat.
I was attempting to use the following to count the number of materials I had stored in ScriptableObjects:
var matCount = terrainData.terrainArray.Specialize()
.Select(x => x.detailMaterials.Length)
.Sum();
Both terrainData.terrainArray
and detailMaterials
are standard Array[] collections, which seemed like it should work fine based on what I saw in the Readme (with Select() and Sum() being supported), but have the following error:
The method or operation is not implemented.
I am wondering if this has anything to do with how/where I am using it, as opposed to what I am using. I am using it in class derived from SystemBase (seen below), which already requires being partial due to source generation being ran on the Unity side of things, but I am using it in a method which is called by an event triggered by a state-machine I have made, so it is just a standard non-Burst compiled method.
public partial class PrepareMapSystem : SystemBase
{
}
The other thing that I am not sure which might be an issue is, all of my code is a package and contained within Assembly Definition files, and as such, in order to reference this package, I added this package as a local package and had to create an Assembly Definition file within your packages main folder. Then in my package, I had to add a reference to that newly created Assembly Definition in order to be able to gain access via using Cathei.LinqGen;
Assembly Definition added to this package
Reference to this package Assembly Definition
I am not sure if this is causing any issue or not as I can properly access the stubs, my method is public, the class is public, etc. The above-mentioned items are the only things I can think of off-hand which are "out of the ordinary" for a Unity project.
P.S. I second the hope for Burst compatibility in the future. I suspect that most Unity users who come across this package are looking for performance anywhere they can find it, but also a slight reprieve from the additional boilerplate that DOTS can bring. So being able to simplify code with Linq-style code while maintaining the amazing performance Burst can bring is exactly the kind of thing I seek out. π
Thanks,
-MH