jackmott / LinqFaster

Linq-like extension functions for Arrays, Span<T>, and List<T> that are faster and allocate less.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Enhancement] Add to Unity Package Manager (UPM)

codmw44 opened this issue · comments

Unity doesn't have nuget. Unity has only UPM. Which have feature: "Add plugin via git".
Add packages to Unity project is more comfortably then via sources from zip
This tutorial may be helpful for add compatibility for UPM
https://www.patreon.com/posts/25070968

I, too, would love to have this as a Unity package. Considering there is no reply to this, and no updates to the package in quite some time, I figure it is a long shot, but should this ever become a Unity package, it would be great to also add it to OpenUPM. https://openupm.com/

Thanks,
-MH

I have not submitted anything to them myself, but I believe the majority of it goes by the repo having a Unity package manifest and the appropriate tags on the repo itself for versioning and categorization.

On a side note, is there anything specific you have to do to get this working with Unity? Upon trying to bring it in after building, pretty much every other Unity package ends up failing to load:

Details

I looked through the wiki, but I didn't see anything specific on it, just that it was compatible.

--- Edit, I just brought in the files themselves from the base package and see that I am missing Span<>, which I thought should be supported as part of C# 8 if I am not mistaken, but I dig deeper to see whats going on.

Ohh, you might need to yank out span, or grab a version from before span was added. Don't know if unity supports that yet.

How might I go about getting a version without span? Is there a specific commit I would have to grab? Normally I would check through the the "Releases" tab but it doesn't seem to be available on the repo.

I apologize, most of my C# experience over the last few years has revolves around Unity and as such I am not super familiar with nuget packages, do they include the source files when you download them? I typically prefer to use that and then create assembly definition files for them when I can to keep things consistent.

I would also be interested in this!

FYI @MostHated the steps to install this package as a dll from nuget:

  1. Go to https://www.nuget.org/packages/LinqFaster/ and install the 1.0.0 base version of the library without Span. Here's a direct link to the download: https://www.nuget.org/api/v2/package/LinqFaster/1.0.0
  2. Rename the extension of the file from .nuget to .zip. (nuget files are just fancy zip files)
  3. Copy the contents of linqfaster.1.0.0/lib/netstandard2.0 folder to your Unity project.

For implementing this feature, it might be good to take a look at as a first step https://github.com/xoofx/UnityNuGet rather than OpenUPM?