Import .cs file into solution through code
Hi everyone,
I've built an editor extension that allows me to configure a bunch of data in an editor window and then save it. When it's saved, it uses the data you've entered to generate a C# class containing all of those fields as static data that can then be used elsewhere in your code.
Without getting too much into the reasons why I might want to do something like this, I have a question.
Does anyone know if there's a way to get your Unity project C# solution to include the newly generated file automatically? Currently, I'm using AssetDatabase.ImportAsset to get Unity to immediately import the file as soon as it's created, but this doesn't seem to integrate it into the solution.
Essentially I'd like to be able to just enter the data in the editor, hit save, then immediately switch over to my IDE and start referencing the newly generated code without any extra steps.
Any help would be greatly appreciated!