Unchanged database keeps getting marked as changed
Unchanged database keeps getting marked as changed
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.
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
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?
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
I'm using 2022.3.10f1
Re: Unchanged database keeps getting marked as changed
Thanks. I'll investigate that version.
Re: Unchanged database keeps getting marked as changed
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
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.
- Attachments
-
- Screenshot 2023-11-19 at 2.59.41 PM.png (336.24 KiB) Viewed 759 times
-
- Screenshot 2023-11-19 at 2.58.39 PM.png (116.96 KiB) Viewed 759 times
Re: Unchanged database keeps getting marked as changed
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
This workaround seemed to work for one minute then the issue occurred again.
Re: Unchanged database keeps getting marked as changed
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
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.