Jump to content

What's the best way to handle lots of .asset files being marked as changed when they haven't actually changed?


Phasedragon

Recommended Posts

This has been quite annoying as it fills my pending changes with a hundred or so .asset files which are necessary for my project. They are automatically compiled whenever a script changes, similar to dll's, but plastic doesn't seem to be able to recognize that they haven't actually changed.

From what I understand, the "correct" way of doing this is to put all your asset files into one big folder and then add that folder to the ignore.conf. Unfortunately this presents two issues: one, these assets exist all over the project so it would be a lot of work to move them to a central location while maintaining organization. And two, we have already checked in those assets at least once and unless I'm misunderstanding, you have to delete those files, add them to the ignore.conf, and then let them be re-created for them to be recognized as ignored. Going through that process on every single asset in the project would be even more tedious.

So I am looking for a better solution. Is there a better way to handle this problem without having to fix each individual asset file?

Link to comment
Share on other sites

  • 2 weeks later...

Hi @Phasedragon,

Thanks for reaching out.

Ignoring these files is not a solution, .asset files are important files that you want to be controlled in your repository, otherwise when another developer downloads the project they would not have access to those files.

I suspect these files are showing up in your Pending Changes view because they are automatically checked out by the legacy Plastic SCM integration within Unity. This integration has been superseded by the Version Control package and is no longer required.

Please can you confirm whether this integration is enabled and disable it to see if this alleviates the issue. To do this...

  1. Within the Unity Editor, navigate to Edit > Project Settings > Version Control
  2. If the Mode option is set to Plastic SCM change it to its default value Visible Meta Files

 I hope this helps.

Link to comment
Share on other sites

  • 2 months later...

If the asset files are automatically recreated after a compile, I would definitely add them to the ignore.conf. To make this maintainable you could simply add a special extension for them like MyAsset.generated.asset and then ignore all files that contain ".generated" for example. You can also do this in one go, by using the workspace explorer in Plastic Full GUI. Context click the file that was already added and simply select "Delete". You can then update the ignore.conf and checkin your changes. It will show all of the files as removed and the ignore as modified and with future checkins, those files should be ignored. You can even automate this by using the commandline if you followed the recommended naming convention. Just find all .generated files and their meta files in Powershell and call the cm rm with the file paths.

If you don't want to make such changes to the project at this time, you could also simply try the preferences option "Check content (hash) when the file timestamp is modified". Which should let Plastic actually diff the content of a file. That would at least only show the files if their content has actually changed.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...