- Home /
How can I programmatically add comments with the current author, modify date, version after each C# file I change gets saved?
Hi,
I'd like to create (or use an existing one) a system to automatically change the first lines of every script I save with my personal data in the form of a comment. (eg: name, license, last change date, email address, number of revision of the file, etc.). Think of it as a dynamic template.
Now, I have a few ideas on how to store and parse the text result, but, since I also am using third party script editors, would like to know if there is some sort of callback or event I can hook to.
I'm using Unity's C#
Answer by tanoshimi · Jan 01, 2017 at 07:25 PM
I recommend you consider using a version control system. Not only will they potentially save your bacon next time you accidentally delete or corrupt your project, but they also typically store all this kind of metadata every time you commit a change to a file that's in the repository.
Here's a guide to get you started: https://unity3d.com/learn/tutorials/topics/cloud-build/creating-your-first-source-control-repository
Your answer
Follow this Question
Related Questions
VBScript through C# in Unity 0 Answers
generic / templatized components / monobehaviors ? 0 Answers
How to load .ht files? 1 Answer
I want to have my player change respawn points based on their distance to them 1 Answer
Script icon changed 0 Answers