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. Dismiss Notice

Resolved Graph asset doesn't always save to disk

Discussion in 'Visual Scripting' started by BrianAmihan, Apr 4, 2022.

  1. BrianAmihan

    BrianAmihan

    Joined:
    Mar 10, 2022
    Posts:
    15
    Hello all,

    Our narrative designer is having a problem where sometimes (pretty rarely) a script graph .asset file won't save the latest changes to disk when she saves.

    For example, this is what she sees in her editor. Everything works locally for her as expected.

    correct.png

    After she commits to Git, this is what other folks see in their editor for this same script. The text asset isn't correctly referenced in the incorrect version.

    incorrect.png

    She can fix this by creating a dummy node in the problem script, saving, removing the dummy, saving, and then committing to Git but obviously this isn't ideal as it isn't easy to notice when this problem happens until a bug has been filed.

    Has anyone encountered this bug before? We'd appreciate any advice!

    Visual Scripting 1.6.1, Unity 2021.1.20f1
     
  2. BrianAmihan

    BrianAmihan

    Joined:
    Mar 10, 2022
    Posts:
    15
    We just saw another permutation of this bug. This time, the designer pushed her changes up to Git and they were uploaded fine. Then I pulled down her changes from Git and the text asset reference was missing on my end. The file on my disk was fine. Restarting Unity caused it to be fixed on my end.

    So Unity didn't "see" the changes to this script until I restarted Unity. We don't need to restart Unity upon pulling down from Git for any other type of file.
     
  3. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,763
    Last edited: Apr 5, 2022
  4. BrianAmihan

    BrianAmihan

    Joined:
    Mar 10, 2022
    Posts:
    15
    Thanks PanthenEye. Yes, it would be ideal to upgrade but we aren't able to do that at the moment. But I looked through the change logs you linked and didn't see anything mentioned regarding a save/load bug.

    So I remain hopeful that somebody out there has encountered the problem and found a solution.
     
  5. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,763
    Locking in a tech stream release might not be the best way to go about things. You could try forcing the UVS update on a new repo branch to check if upgrading improves the issue. Edit the package manager manifest.json UVS version manually from 1.6.1 to 1.7.7 and it'll auto update.

    It's a serialization issue (or some specific changes do not mark the graph asset/scene as dirty) and there are a couple of change log entries that touch on that. The upcoming 1.7.8 will probably address more of these issues as well.

    EDIT: Also, 1.6 won't receive any new updates so even if this is a new bug and they can repro, it'll only be fixed for a future 1.7 or 1.8 release. If you're using UVS, you pretty much have to periodically upgrade Unity to get the latest bug fixes as 1.7 is officially validated only for 2021.2 and the upcoming 2021.3. And 1.8 will be available only in 2022.1+. Albeit, 1.7 for LTS should be longer supported than 1.6, which was only validated for 2021.1 tech stream.
     
    Last edited: Apr 5, 2022
    ericb_unity likes this.
  6. BrianAmihan

    BrianAmihan

    Joined:
    Mar 10, 2022
    Posts:
    15
    Thanks again for the advice @PanthenEye. We updated to Unity 2021.2.19f1 and UVS 1.7.6 and the problem has gone away. I wanted to wait a bit before replying to this thread so I could confirm the issue is resolved and it appears that it is.