I am thinking of writing an extension for unity Editor. I want to create a ‘setup’ window, which will do some work for me and setup any new project based on settings I choose. For example: I check ‘google play’, ‘save files’ and ‘achievements’ checkboxes and hit ‘Setup’ button. Now, based on these settings the script would generate necessary generic classes for me.
Now for the questions:
- How can I store code template files so my extention would read it? What type? Xml? Other?
the extension needs to save those templates as .cs files
- How can I specify what to read? Reading from line X to line Y would be ok., but ideally I need something like this: look for a text “JFHDDI” (for example) → read until you come across this “HFIDDN” → then build a .cs file from what you have read.
- Can I edit .cs scripts with another script (not runtime of course)?
Although, I could store my code templates as xml files I still can’t find solution to my second question.
Any help much appreciated.