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

Hosted Agent: Not Found Unity Editor Directory

Open L0G1C opened this issue 5 years ago • 1 comments

Greetings and thanks for the hard work on this plugin. I'm trying to build my Unity project with a Hosted agent and I wonder if they just don't have the latest version of the Unity Hub Editor yet? I receive the following error during the Unity build task: Not found Unity Editor Directory: C:\Program Files\Unity\Hub\Editor\2019.2.0f1\Editor

Is this just a matter of waiting for MS to update their Agent machines? Or is there anything I can actually do?

I also tried setting the build task to look for Unity editor in the UNITYHUB_EDITORS_FOLDER_LOCATION environment variable but it looks like Hosted Agents are not setting that either. ##[error]Expected UNITYHUB_EDITORS_FOLDER_LOCATION environment variable to be set!

L0G1C avatar Aug 17 '19 04:08 L0G1C

Hi @L0G1C, basically you are right. The hosted agents provided by Microsoft don't have the latest Untiy version installed. They usually only have the latest LTS release (2018.4) I think.

There is a workaround to this, in that you can install the required Unity Editor on build. This will of course increase build times drastically. The way to do this, is documented here (https://dinomite-studios.github.io/unity-azure-pipelines-tasks/hosted-agent.html). It's not 100% up to date so let me know, if you run into any issues.

Please also consider that for building using a hosted agent, you need to have a Unity Plus/Pro seat.

FejZa avatar Aug 17 '19 09:08 FejZa