Skip to content

Conversation

@jorpelae
Copy link
Contributor

Why?
Following the instructions on the README of the Unity sample is not straightforward. .sln generation and building are left to the user and results may differ depending on how the user approaches it.

What?

  • Changed Packages manifest so NuGet For Unity installation is automatically done by Unity
  • Included NuGet contents to avoid initial compilation errors (version was hardcoded anyway on the configuration)
  • Update sample project to recent LTS (2022.3.51f1)
  • Update velopack to latest version (0.0.626)
  • Update README and add instructions for msbuild

Future work?

  • Maybe release as a UPM package instead of a project to maximize compatibility with any Unity version
  • Maybe release a Unity Asset Store package to improve searchability

@caesay
Copy link
Member

caesay commented Nov 2, 2024

I see in the Packages folder, there are a bunch of nuget binaries. Can this be added to gitignore and restored when compiling?

@jorpelae
Copy link
Contributor Author

jorpelae commented Nov 4, 2024

Good question. The answer is yes, if we remove the nuget binaries, they will be restored when compiling.
The problem is the order of compilation of Unity. The scripts will be compiled before the packages are downloaded, so an error screen is shown:

Screenshot 2024-11-04 123141

If "Ignore" is pressed, several errors will be shown in the console:

image_2024-11-04_123438231

After this errors are generated, the nugets will be downloaded and installed, so no user action is really needed (apart from selecting "Ignore").

This will happen only the first time the project is opened. After that, the nuget files would be restored and no error would be shown.

So we can:
・add the nuget binaries to the .gitignore and state in the README that the errors are expected, or
・include the binaries (the main downside would be repository size?)

As a note, the nuget package versions are stated on packages.config, so including binaries or not, the result would be the same.

What should we do?

@caesay
Copy link
Member

caesay commented Nov 6, 2024

I don't really want the nuget packages committed into our git repo. I think maybe we can add something to the readme about the warnings coming up the first time.

@jorpelae
Copy link
Contributor Author

jorpelae commented Nov 7, 2024

Done! What do you think now?

@caesay
Copy link
Member

caesay commented Nov 7, 2024

Awesome! I'm not able to test this myself but it looks good. Thanks a lot. I do think we can improve the Unity story with Velopack further though, it would be nice to eliminate that C++ project? If you want to have a discussion about further improvements please message me on Discord

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

Successfully merging this pull request may close these issues.

2 participants