heroiclabs / nakama-unity

Unity client for Nakama server.
https://heroiclabs.com/docs/unity-client-guide
Other
411 stars 75 forks source link

Migrate to Unity package manager #91

Closed thegoldenmule closed 4 years ago

thegoldenmule commented 4 years ago
Describe the problem

To share systems between games, it is becoming common to create Unity packages that can specify their own external dependencies. Then it's a simple matter of adding the new package to each game's package manifest.

Updating the Nakama SDK in 10 of our games requires us to copy code 10 times, and it's unclear what version of the package each game is even using.

Describe the solution you'd like

Ideally, the Nakama SDK would be a Unity package now that Unity natively supports package management. This would allow us to do something like:

{
  "dependencies": {
    "com.heroiclabs.nakama": "git+https://github.com/heroiclabs/nakama.git"
  },
  "lock": {
    "com.heroiclabs.nakama": {
      "hash": "some-git-hash",
      "revision": "HEAD"
    }
  }
}

The lock is optional, and would allow us to specify experimental branches or specific revisions in the case there is a breaking bug.

novabyte commented 4 years ago

@thegoldenmule I'll have a chat with @lugehorsam and we can discuss the changes to support the Unity Package Manager. I've never used it on a project yet but am excited to see Unity catch up to a world of real dependency management :)

thegoldenmule commented 4 years ago

Thanks @novabyte. It should be mostly putting stuff in appropriate folders and specifying a few additional config files (project.json and asmdef). I am available to help out if needed.