Page 1 of 2

Unchanged database keeps getting marked as changed

Posted: Sat Nov 18, 2023 2:28 pm
by star4z
Hello!

The database appears to periodically save and overwrite the "date modified property" of the asset file, even when the database hasn't been modified. This is annoying as it means I have to constantly either a. commit new unknown changes to version control or b. revert the file. Better practice would be to do case b, though I would prefer to not have to deal with this. I think there should be a check whether anything has actually changed before the file is saved. I'm using PlasticSCM for VCS currently, though I've seen the issue with a Git project I've worked on before as well. I looked in Plastic's Diff editor and it showed no differences for the file between the changed version and the current version.

Re: Unchanged database keeps getting marked as changed

Posted: Sat Nov 18, 2023 3:04 pm
by Tony Li
Hi,

I'll take a look. It should only be marking the database file dirty when actual changes are made. What Unity editor version are you using?

Re: Unchanged database keeps getting marked as changed

Posted: Sat Nov 18, 2023 9:42 pm
by star4z
I'm using 2022.3.10f1

Re: Unchanged database keeps getting marked as changed

Posted: Sun Nov 19, 2023 8:37 am
by Tony Li
Thanks. I'll investigate that version.

Re: Unchanged database keeps getting marked as changed

Posted: Sun Nov 19, 2023 5:41 pm
by star4z
It looks to me like this happens the first time I play a scene on a given day.

Re: Unchanged database keeps getting marked as changed

Posted: Sun Nov 19, 2023 6:04 pm
by star4z
It looks like this also happens after other assets are changed. I've included screenshots of what the file looks like in Unity's VCS tooling and the PlasticSCM Diff for the file showing that the file is unchanged.

Re: Unchanged database keeps getting marked as changed

Posted: Sun Nov 19, 2023 6:10 pm
by star4z
It looks like it is expected behavior for PlasticSCM to mark files with a modified timestamp as changed even if the contents aren't, though there is a workaround, required to be set up for every client: Preferences --> Other options --> Check content (hash) when the file timestamp is modified to set it as "Changed".

Re: Unchanged database keeps getting marked as changed

Posted: Sun Nov 19, 2023 6:15 pm
by star4z
This workaround seemed to work for one minute then the issue occurred again.

Re: Unchanged database keeps getting marked as changed

Posted: Sun Nov 19, 2023 8:17 pm
by Tony Li
When the issue happened again, is it possible that there was actually a difference in the files? Otherwise, maybe the setting got reverted?

Re: Unchanged database keeps getting marked as changed

Posted: Mon Nov 20, 2023 2:29 am
by star4z
I didn't see a different when the issue happened again. The setting doesn't seem to have reverted, either. I tried toggling the setting on and off when I saw the issue come back and didn't see any change.