Context:
I'm working with Unity using Git and we have .gitignore setup so that we could create "_local" folder anywhere in Assets and it won't be commited. It makes for kind of a Debug/Backup folder, where I can put any of textures I want to check or any script I want to test in Unity, but keep it locally.
Problem:
That unfortunately causes problems. After referencing many local files I decide to commit the project, so I make all the references pointing files that will be commited. Sometimes though I don't notice one wrong reference and I commit the project which causes errors on collaborators' devices.
Idea:
I came up with an idea that I could write a script which goes through every reference and if any of them points to a local file it should generate a warning or error. All that would happen after saving the project.
But can it be done?
Is there a way to find all the references and call the script once the project is saved?