microsoft / unitysetup.powershell

Powershell module for interfacing with Unity installs and projects.
MIT License
178 stars 47 forks source link

Get-UnitySetupInstance can't find some of installed unity versions on mac #208

Open yvz-dmr opened 4 years ago

yvz-dmr commented 4 years ago

I have installed all versions of unity in my mac via UnitySetup powershell module but it cant find some of them when using Get-UnitySetupInstance. I am using unity setup module version of 5.3.134.

All unity versions are located in same directory which is default unity hub install location. For example unity version 2019.4.0f1 is installed but it isn't listed when calling Get-UnitySetupInstance.

image

MaxGuernseyIII commented 4 years ago

I'm experiencing this with 2020.1.0f1 installed via this package.

MaxGuernseyIII commented 4 years ago

In my case, it's the inability of the system to determine the version number that appears to be the problem. Is that what's happening to you?

mister-liss commented 3 years ago

Not sure if this is a seperate bug but might be related. On windows after I installed a 2019 version I started getting the following after Get-UnitySetupInstance and Start-UnityEditor

'Unable to find version for C:\Program Files\Unity\Hub\Editor\2019.4.14f1'

image

mister-liss commented 3 years ago

Not sure if this is a seperate bug but might be related. On windows after I installed a 2019 version I started getting the following after Get-UnitySetupInstance and Start-UnityEditor

'Unable to find version for C:\Program Files\Unity\Hub\Editor\2019.4.14f1'

image

I was able to resolve this by updating UnitySetup, duh.

mister-liss commented 3 years ago

woops, did not mean to close the whole issue

deitry commented 2 years ago

I recently encountered same and found that Unity installed via Install-UnitySetupInstance (at least 2021.3.0f1) doesn't have modules.json file which is used to "establish" version. Unity installed via Unity Hub have one and didn't have this issue.

With current code (see Get-UnitySetupInstanceVersion content like https://github.com/microsoft/unitysetup.powershell/blob/4c4041add34169f4d1ebbecd99df57fe79e3c68c/UnitySetup/UnitySetup.psm1#L1247 ), solution would be to extract Unity version from path itself

yacuzo commented 2 years ago

I got this on a new build-server with 2021.3.3f1. The old build-server (also installed from these scripts) does not have this issue. Both servers have the same version of the scripts (5.4.130). Any info I can provide you to help out?