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

Create repo for a UPM version of SimpleJSON #55

Open
TomatechGames opened this issue Apr 30, 2023 · 1 comment
Open

Create repo for a UPM version of SimpleJSON #55

TomatechGames opened this issue Apr 30, 2023 · 1 comment

Comments

@TomatechGames
Copy link

Using SimpleJSON in custom packages either results in

  • including the files unchanged, meaning that it will break when it is added to projects containing other packages that do this
  • including the files, but appending your namespace to the SimpleJSON namepace. this prevents collisions, but the json types in one namespace can't be converted to the same json types in another namspace without serializing the objects to a string and deserializing them back to an object.
  • using one of the unofficial forks which are often severely desynchronised from the main repo

My proposed solutions are

  • Convert the SimpleJSON repo into a Unity Package (unlikely)
  • Add a branch to the SimpleJSON repo which contains the Unity Package (tricky to move changes from main branch to package branch)
  • Create an entire new repo for the Unity Package, and clone the SimpleJSON repo into a folder named Runtime/SimpleJSON. Add a .gitignore file to the SimpleJSON repo ignoring any *.meta files. When changes are made to SimpleJSON, they can be pulled to the repo inside the Unity Package repo, then the Unity Package can push those changes to it's own repo.
@christianhanne
Copy link

I created an installable unity package for this. You can find it here:
https://github.com/christianhanne/SimpleJSON/tree/unity-package

It's really basic right now. I just created the bare minimum to make this work in all projects, that previously used to install this manually. Imho there aren't really any downsides of just moving everything to a Runtime folder and adding the necessary config files. If you just want to download the package, you can still do so. Would love to create a pull request, if the author of this package is interested.

I also added a README file with installation instructions.

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

No branches or pull requests

2 participants