YamlDotNet icon indicating copy to clipboard operation
YamlDotNet copied to clipboard

Unity Package

Open robin-moss opened this issue 4 years ago • 13 comments

Is your feature request related to a problem? Please describe.

It would be great to be able to install YamlDotNet in Unity as a package, rather than via the asset store. This would allow me to install a specific version, and not need to store the code in VCS.

Describe the solution you'd like A clear and concise description of what you want to happen.

Add a package.json to this repo to allow installation via Git in the Unity Package Manager

Unity package.json

Describe alternatives you've considered

The alternatives are currently:

  • Install via asset store and add code to VCS
  • Install via asset store and ignore the code, requiring each developer to manually import the file (version differences could be an issue)
  • Fork this repo and make it a package ourselves

If there is another/better alternative please let me know :)

Additional context

The biggest downside I can see is that a commit would need to be made to update the version in the package.json which I don't believe is currently done

robin-moss avatar Oct 08 '21 09:10 robin-moss

Also looks like it needs an asmdef

robin-moss avatar Oct 12 '21 12:10 robin-moss

I too am not a fan of the asset store version for the same reasons you've already mentioned.

@robin-moss a fork would be a viable way for now, I think. Just adding the files needed for Unity support, maybe removing some others. Should be trivial to sync to the upstream progress if there are no structural changes, too: Merge upstream and update version inside of package.json... Maybe I'm missing something. @aaubry could also add a branch for UPM support to not move this to another repository.

@steinbitglis as you've worked on Unity compat in the past and are maintaining the asset store version -- what are your thoughts about this?

krisrok avatar Jan 04 '22 14:01 krisrok

@krisrok we've been using NuGetForUnity to use the NuGet package instead, but there is also MSBuildForUnity that can grab NuGet packages.

But still using UPM would be a great improvement if you don't want the hassle of using NuGet with Unity

robin-moss avatar Jan 04 '22 15:01 robin-moss

@krisrok I have been using a private npm repository (Verdaccio) for all kinds of stuff for a while now. Works very well. I don't know much about public npm hosting, but maybe OpenUPM could be the place for it?

The asset store version has been very rarely and very manually updated. That's why it's at the Asset Store, so that an easy-to-use digested version for Unity was available. I think that @aaubry has done a very good job to allow YamlDotNet work in Unity, and it shouldn't be very hard to close the gap.

steinbitglis avatar Jan 04 '22 15:01 steinbitglis

What I could do, is to push to OpenUPM every time I push to the asset store (very infrequently, mind you). That way, the plugin at least doesn't go into the Assets folder, and you won't have to deal with questions about VCS.

steinbitglis avatar Jan 04 '22 15:01 steinbitglis

The two latest packages from the asset store can now be seen in the package manager by putting the following in your manifest.json

"scopedRegistries": [ { "name": "Rain Office", "url": "https://office.rain-games.com:4873", "scopes": [ "yamldotnet" ] } ],

I don't like how Unity or UPM ties github into their tools, so that's why I don't just put everything there. The mentioned server will stay online for the forseeable future, but it's not a great, permanent place for a public package like this. Ideas (or hosting) are welcome.

steinbitglis avatar Jan 05 '22 16:01 steinbitglis

So much confidence. So little help.

Moriphete avatar Sep 18 '22 23:09 Moriphete

Summit, theological intrusion.

Moriphete avatar Sep 18 '22 23:09 Moriphete

Has anyone been able to import via github link? The asset store version is outdated and I would like to include the latest one.

ModischFabrications avatar Dec 16 '22 13:12 ModischFabrications

Enhancements aren't necessarily the priority right now. My priority on working on this project is pretty much

  1. Vulnerabilities
  2. Bugs
  3. Language features
  4. Enhancements

That being said, Unity is very popular in the issues here, and it's something I really want to work on, just haven't had the time yet. One thing that would be very, very beneficial is a Unity project in a repo that references YamlDotNet as a baseline. I have seen a few different ways of referencing it, one is as a package, another is the actual source. This now seems like there may be a 3rd. I haven't ever used Unity, so it's an uncharted area for me, and having someone proficient in Unity, with the multiple ways of bringing in libraries, to help build a simple project, would really help. Would any of you be willing to help with that? I can start up a repo outside of YamlDotNet, in my personal user, where we could all work on it. Then, once we get it completed and working correctly, potentially bring it in here.

EdwardCooke avatar Dec 17 '22 20:12 EdwardCooke

Integration into Unity is the easy part, it's literally just adding a URL via package manager and using the code. The assembly and everything surrounding it is updated automatically.

I'm only experienced on the receiving end of a unity project, so I can't help a lot with the preparations needed for it. This is the smallest unity package that can be imported directly into unity that I know of: https://github.com/JanikHelbig/TinyContainer . It also contains a simple install instruction for your test project and might be a good reference.

ModischFabrications avatar Dec 20 '22 15:12 ModischFabrications

Great thanks. I’ll poke around when I get time.

EdwardCooke avatar Dec 20 '22 16:12 EdwardCooke

Has anyone been able to import via github link? The asset store version is outdated and I would like to include the latest one.

The asset store version should be up to date now.

steinbitglis avatar Jan 16 '23 09:01 steinbitglis