Rulesets with Unity

Can someone tell me how to make Unity remember the ruleset that’s being used even when it’s restarted?

In more detail, I’m trying to implement StyleCop with Unity which requires a custom ruleset in order to function. Simply selecting the correct ruleset in the Project Settings inside of Visual Studio (2017) will make the ruleset function correctly. However, upon restarting Unity, the reference to the selected ruleset will break. Any idea on how to keep the reference?

1 Like

Unity regenerates project files losing your settings. You can create editor script or plugin to restore project file settings after it’s regenerated. This FileSystemWatcher Класс (System.IO) | Microsoft Learn will be usefull.