Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Bug Hub does not play nice with Version Control (e.g. git)

Discussion in 'Unity Hub' started by fherbst, May 11, 2020.

  1. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    799
    Reported case: 1173030. @BasilUnity here's your new thread.

    The Unity Hub is not able to properly tell a project's version after initial launch. If the version changes (e.g. you do a git pull), Hub does not see it, happily pretending that the project is still on an older version. To make matters worse, when you select the right version before opening, it will warn and shout and tell you not to do that since it thinks it's the wrong one.

    This is a serious workflow issue, has cost me days of fixing broken Libraries across multiple machines, and is a general pain that comes up nearly daily when maintaining multiple projects and a team of mixed devs/artists.

    Reproduction is super easy:
    - open Hub in the morning to launch a project
    - pull changes in git on any project that has been upgraded - ProjectVersion.txt has changed
    - open Hub again (it was still down in the taskbar of course)
    - note that the version shown is incorrect
    - if you click the project, it will use the wrong version, essentially downgrading without warning, risking nearly 100% change of data loss and corruption
    - if you forcefully select the right version (because you, in contrast to the Unity Hub, can look at the ProjectVersion.txt and see which one the project expects), Hub will helpfully warn you that this would be the wrong version.

    Now, imagine the above happening with a distributed team of developers and artists, on, say, 20 active projects of which some are obviously upgraded to newer versions sometimes. Everything is breaking all the time, many hours are spent debugging why stuff broke until it turns out someome now has the project open in a wrong version without any warning, etc.

    Note this bug is open since August 2019 and nobody has reacted so far besides initially agreeing that it's a bug. I don't know if there's an Issue Tracker link.

    Workaround is currently to tell everyone "after you did a git pull and it might have contained a project upgrade, exit Unity Hub from the tool bar (little icon) and launch it again."

    Can this please be finally fixed? You're reading in all the ProjectVersion.txt's on launch anyways, can you please read them in on Hub focus? Or at least provide a refresh shortcut (F5), like every other software?
     
  2. joeksy

    joeksy

    Unity Technologies

    Joined:
    Jan 12, 2017
    Posts:
    156
    Hi,
    Sorry for the inconvenience, as you mentioned, currently the Hub does not monitor changes done outside Unity.
    We have in plan to improve this flow, but unfortunately do not have an ETA.
     
  3. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    799
    Hi, that's not entirely true, it updates the version after completely closing and restarting Hub.

    Please note that this is a real pain point with Hub. It's nice that you bring out new features (looking at the release notes) geared towards beginners but please do not forget about actual long-time users who are using Unity to work daily.

    Also I want to repeat that this is a huge risk for data and project corruption.
     
    Last edited: May 11, 2020
  4. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,022
    fherbst likes this.
  5. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    799
    Thanks Leonhard. That description makes it sound as if that was a cosmetic issue though! - no word of possible library and project corruption, this resulting in the Hub breaking projects, ...