unity-azure-pipelines-tasks icon indicating copy to clipboard operation
unity-azure-pipelines-tasks copied to clipboard

Ability to specify the editor full path

Open bdovaz opened this issue 5 years ago • 3 comments

I'm using:

https://github.com/DragonBox/u3d

In order to automatically install Unity editors but the problem is that at least on macOS it always preffixes the editor folder name with "Unity_" (Example: Unity_2019.4.0f1) so with "customUnityEditorsPath" will not find it because it will try to find "2019.4.0f1" and not "Unity_2019.4.0f1".

Can you fix it @FejZa? Thanks.

bdovaz avatar Sep 15 '20 14:09 bdovaz

Hi there, thanks for the feedback and thanks for bringing the tool to my attention. Looks like a nice utility! I'll take a look into what's needed to get your scenario to work.

FejZa avatar Sep 16 '20 07:09 FejZa

It occurs to me that if we can somehow pass a "format" to the name of the Unity folder to look for and I suppose it would not be a very difficult change to make I imagine:

customUnityEditorsPath: D:/UnityInstallers customUnityFolderFormat: Unity_{0}

So you can format it and do the following: D:/UnityInstallers/Unity_2019.4.0f1

And by default "customUnityFolderFormat" is {0} so it isn't a breaking change.

Thanks @FejZa !

bdovaz avatar Sep 16 '20 08:09 bdovaz

I also ran into an issue with this when trying to use the "Unity Build" and "Unity Test" tasks. Our editor was not installed using Unity Hub, so it was installed at the path "D:\Program Files\Unity\Editor\Unity.exe".

I used the "Specify Path" option for the unity editor location and specified "D:\Program Files\Unity\Editor". The task then appended the version and "\Editor" to this making the full path it was looking for "D:\Program Files\Unity\Editor\2019.2.18f1\Editor\Unity.exe". This did not work.

The only way I found to get around this was to change the path structure on our build machine to adhere to what the task expected.

It would be very convenient if we were able to specify the full path to the editor folder without anything being appended.

OmegaJak avatar Apr 23 '21 17:04 OmegaJak