Search Unity

Allow overriding of preferred unity version on a per-project basis

Discussion in 'Unity Hub' started by KapuraIII, Jan 24, 2018.

  1. KapuraIII

    KapuraIII

    Joined:
    Oct 25, 2017
    Posts:
    11
    I intend to use the most recent versions of Unity when I start new projects, but I work in multiple projects, some of which have dependencies which have not or cannot be updated to my preferred version. It seems like low-hanging fruit to allow me to tell Unity Hub to always open a project with a non-preferred version.
     
    Narv likes this.
  2. olkeencole

    olkeencole

    Joined:
    Oct 2, 2009
    Posts:
    17
    I second this motion -- the whole reason I need to keep older versions of Unity around is for the need to maintain specific projects that are too volatile to upgrade.
     
  3. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    Yes, this exactly.
     
  4. max_striebel

    max_striebel

    Joined:
    Oct 24, 2014
    Posts:
    2
    In my opinion it should be the default to open a project in the version it was last opened. If this version is not on my machine it should give a popup with the option to ether download this version or to upgrade it to a version on my machine. The way it is now I can't use because it's just a mater of time until I accidentally open a project with the wrong version, with will cost me several hours until all the re-imports are done.
     
    Seneral likes this.
  5. hessel_mm

    hessel_mm

    Joined:
    Mar 12, 2014
    Posts:
    36
    In fact, Unity stores the version in ProjectVersion.txt in the ProjectSettings folder, it would seem sensible for the hub to try and open the project with that version?
     
    Seneral, TaleOf4Gamers and bwheatley like this.
  6. JBPrime

    JBPrime

    Joined:
    Jan 28, 2013
    Posts:
    5
    I found a hack of sorts that's at least valid with the beta Hub v.0.11.0.

    I located all my existing editor installs on my computer and pointed the Hub at them, but I noticed they were all coming up with weird version numbers like 5.5.3.63932. And when I click on a project with that actual version (5.5.3p3), the Hub tells me to download the version or use the preferred version, even though I have the right one installed.

    I went to the AppData for the Hub (<Windows AppData>\Roaming\UnityHub) and looked in the file editors.json. It's plaintext JSON with a list of all the editor information that I'd added to the Hub. 5.5.3p3 looks like this, for instance:

    "5.5.3.63932":{"version":"5.5.3.63932","shortVersion":"5.5.3","location":"C:\\Program Files\\Unity553p3\\Editor\\Unity.exe","manual":true}

    I changed "version" to "5.5.3p3" so it matched what's in the Unity project's ProjectVersion.txt, then relaunched the Hub. Now when I click on the project, it automatically opens with the correct editor.
     
  7. mathieub

    mathieub

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    48
    Indeed, this is a current limitation of the Beta version of the Hub.
    We're aware of it and we'll come with a more suitable solution for located Editor's installs.
     
  8. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    6,311
    Thanks for sharing this. It fixes the issue so now clicking on the project opens it in the correct version without me having to pick it from the list.
     
  9. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,205
    Thanks! Remember to kill the Unity Hub background processes, too, didn't work for me at first...
     
unityunity