Larusso/unity-version-manager

Windows compatibility

Opened this issue · 3 comments

@Larusso I have been trying for several years to find a reliable and up to date tool to manage the installation of Unity editors and modules via CI.

I have gone through:

  • u3d
  • Unity-Powershell
  • Unity Hub cli

All of them either lack functionality or stop updating and fall into oblivion.

My last hope was the official Unity Hub cli but it's a big disaster and quite abandoned because no matter how much you write in the forum nobody answers or they tell you "we'll look into it" and 2 years go by in the meantime. It's not a real cli, it's a big mess.

That's why I want to encourage myself to give this tool a try but our CI machines are Windows so I would have to find some way to be able to run it from that platform.

Is it possible?

All I see in the Readme.md are references to macOS with brew.

And one last question, how integrated is it with the hub? There is some mention in the Readme.md file but it is not very clear.

Is it integrated to the point of "fooling" the hub and the editors and modules appear in the hub as if you had installed them through the hub?

Thanks!

Hi thanks for your interest.
I created this tool mainly as a hobby project but brought it into the company I work for because I manage a farm of CI machines and need to maintain multiple versions of Unity. I don't use this tool directly rather I use a JNI library which is derived from the internal rust lib this project exports as well. I use gradle to install Unity at runtime during a build.

My main platform is macOS on which this tool works without issues. Windows platform works as well but has issues. You either need it to run from an admin shell or have a desktop session on which you can click on the admin prompt. The reason for that is how the installers work.
I decompiled Unity Hub and ported the installer logic to rust. On windows even Unity Hub uses the plain installers from Unity. These installers need Admin rights when executed even when the installation is for the current User only.
The macOS installers would have the same problem but Unity Hub does some dirty tricks to get around this and I simply ported this.

From my personal tests I can also say that Linux works great with this tool. But you may need some more dependencies.

To your last question. The tool integrates with Unity Hub which means that it reads the configs to know where Unity installations should end up and writes the editors file if you decide to install a version to a custom location. It also writes the modules.json file which then allows Unity Hub to install missing modules etc. I didn't touch this part in quite some time and could be outdated for Unity 2020.

And here lies the problem. The Project can only work if one updates it with the latest changes from Unity Hub since Unity decided in their wisdom to keep version specific knowledge in the Unity Hub source code.

I hope that answers most of your questions.

I sadly have no prebuilt binaries for windows. The process to set this up was always a little bit too much hassle for me. Also if you want to try it out use the 'install2' command. It supports the newer module structure from 2019.3 onwards. I had no time to straighten this out yet.