ChainSafe / web3.unity

🕹 Unity SDK for building games that interact with blockchains.
GNU Lesser General Public License v3.0
919 stars 234 forks source link

Replace embedded Nethereum libs with UPM package #1061

Closed oleksandrchainsafe closed 4 weeks ago

oleksandrchainsafe commented 2 months ago

Summary Replace the Nethereum libraries, that are embedded into the packages, with OpenUPM package.

Suggested features or ways to address the summary

  1. Do not copy Nethereum libraries into the packages.
  2. Make Core Unity package depend on Nethreum OpenUPM package.

Motivation Current approach causes conflicts for devs who have other packages depended on Nethereum in their project.

Acceptance Criteria

  1. No more embedded Nethereum libraries in all Unity packages.
  2. All the functionality from all the packages compiles and works as expected.
kantagara commented 4 weeks ago

Unfortunately I have to close this ticket, and the main reason for this is... you guessed it.... Unity itself! There is no devex friendly way for people to import additional dependencies from openUPM if our package depends on it. They'd have to manually go to their manifest.json and add scoped registries there, which is not very user-friendly. People have been requesting this feature for over 4 years on the Unitys forum

Final verdict is: We'll have two release paths:

  1. Standard openUPM way we are currently doing -> Not recommended for people with Nethereum dependencies
  2. .unitypackage distribution -> Way more familiar to 99% of the unity developers, super easy distribution. If someone has nethereum somewhere, they can easily remove the nethereum library from our package. We'll probably pack all of our functionality in the package and devs can remove the things they don't want. (our packages are not that big so that someone can argue it will take much of their storage space).