Automatic version selection

Is there a way to automatically select the version UCB uses based on the project version set in ProjectSettings/ProjectVersion.txt ? I’m most of the time on the latest non-beta U5 version, but not always, so selecting “Always Use Latest 5.x (Includes Beta)” is not ideal.

That’s a great suggestion! However, what would you expect if you use a Unity Version which is not supported? Fall back to the next supported one? For instance, if you use alpha/beta version. On 4.x the ProjectVersion.txt does not exist wich makes it a little bit trickier. :roll_eyes:

I guess with this “automatic” option selected, it could just use the next older supported one, and on 4.x the latest one. Also, it would be useful to see the active unity version in the projects overview, so we don’t have to go to the settings to check if it’s using the right version.

1 Like

Here’s my thought, tell me if this sounds like something you’d like:

  • When setting up a new project, when choosing a version of Unity, in addition to all the other 4.x and 5.x options, there would be a ‘detect’ option that attempted to find this data in your project settings. This would work on some versions of Unity, but not all - so if it failed the user would still have to select manually.
  • After the project is setup, if we detect the version has changed from what was originally configured, we could still attempt to build, but also throw up a warning message saying “Unity version mismatch detected…” - with a button to go the settings and try to resolve, or ignore…

@any_user - Does that sound useful?

I’m not sure how useful it would be if I still have to manually correct the changed version each time I change the version of the project, even if there’s a warning message. With the weekly patch releases it happens quite often that I change the version with a patch release and then sometimes roll back again because there are some unexpected side-effects. Maybe not every week, but often enough. With your proposed solution, I’d have to go to the settings every time before starting a new build, when the version changed. Of course it’s possible to do that, but in case I forget it once, I’d have to wait for a new build after correcting the setting, which can take quite some time in some projects.

I would rather not have to think about all that. For U5, a more practical would be a setting that just checks the version of the project before building (but after checking out the last changes), and uses the right version without any manual intervention.

Yup, you are right. Re-reading #2 today, I was off base - an error message saying “we tried to detect and failed so we built with version X as the fallback” seems like a much better workflow. Otherwise a successfully detected version change should just work as planned.

OK, good input! Will keep you posted on this feature. Thx @any_user !