Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unity Package #640

Open
robin-moss opened this issue Oct 8, 2021 · 13 comments
Open

Unity Package #640

robin-moss opened this issue Oct 8, 2021 · 13 comments

Comments

@robin-moss
Copy link

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
Copy link
Author

Also looks like it needs an asmdef

@krisrok
Copy link

krisrok commented Jan 4, 2022

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?

@robin-moss
Copy link
Author

@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

@steinbitglis
Copy link
Contributor

@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
Copy link
Contributor

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
Copy link
Contributor

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.

@ModischFabrications
Copy link

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

@EdwardCooke
Copy link
Collaborator

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.

@ModischFabrications
Copy link

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.

@EdwardCooke
Copy link
Collaborator

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

@steinbitglis
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
@steinbitglis @krisrok @ModischFabrications @robin-moss @EdwardCooke and others