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

Unity Hub folder got renamed during install #35

Open
thienhaflash opened this issue Apr 18, 2023 · 1 comment
Open

Unity Hub folder got renamed during install #35

thienhaflash opened this issue Apr 18, 2023 · 1 comment

Comments

@thienhaflash
Copy link

I know that the rename is intentional but with that, the unity path that all my batch script will stop working during that time. Is there any way to disable this behavior? (I understand that I can use install-unity to open the project but it's not reasonable - I use unity-install to install unity and that's it).

Also, Unity got installed in a non-standard folder, is there any option to let it install in the correct (hub-based) folder with the exact minor version?

Another bug is that when we can not install Unity 2020.3 on a Mac Silicon (M1, M2), considering it's a batch script so checking if a silicon version is available is not very feasible (unity version >= 2021.2)

@sttz
Copy link
Owner

sttz commented Apr 22, 2023

install-unity is using Unity's pkg packages to install the editor and build support packages. Those always install to /Applications/Unity/ and will overwrite anything already at that path. install-unity has to temporarily move anything at that path out of the way to prevent it from being overwritten.

There's an extended option to customize the install path (--opt installPathMac=…) but since the Unity Hub path is a subfolder of the pkg install path, I doubt it will work correctly when you set this option to the Hub install path. You could change the Hub install path to something that's outside /Applications/Unity/ and then set the `installPathMac´ option to the same path.

I think Unity Hub is just treating the pkg packages as archives and that's why it can install them to an arbitrary path. At the time when I was implementing this, it wasn't clear that would be safe, as the packages could contain install scripts that would be skipped when simply unarchiving the packages. I might revisit this at some point but it's not a trivial change.

install-unity defaults to trying to install the editor with the native architecture. If you want to install an Intel editor on Apple Silicon, you have to set --platform macosintel. This was made explicit to prevent accidentally installing a non-native editor.

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