Almost every time when I want to commit my work,there are many meaningless “timeCreated” changes in lots of meta files. It’s very annoying. I have to discard them all, or commit them all , neither is good practice. Is there a way to prevent it ?
I found the cause for this problem. Every time a script modifies the user data of an asset, unity sets a new creation date. In my case, Prefab Evolution extension was modifying the user data. It’s a Unity bug. I don’t have time to report this bug.
It’s not a bug, but a design flaw (in my opinion). To change a texture in your project at edit time, you have to use the TextureImporter. When you set a value, import, then set the value back to the previous one and import again, I would expect no assets to be changed, because I haven’t actually changed any values. But Unity assumes that I want to know the time of the last import and updates the timeCreated flag. This might be helpful in some cases, but in a lot of other cases, I don’t want this to ever be updated, because it causes changes for my source control system.
At least, there should be an option to set this behaviour from code, so I can chose if I want to update the timeCreated flag or not. Or better, allow changing of textures in the editor without having to import the asset multiple times, just to set a temporary value.