Is there a way to run a script when compilation fails?

Yeah so I’ve automatically created a class Generator that generates a ScriptableObject that can hold any seralizable value.

it will be regenerated automatically, when FieldTypes differ or are missing. But now I figured, if the prexisting FieldType doesn’t exist in the Project compilation, it will throw an Error and renders me unable to regenerate the file (yeah, kinda retarded now, am I not?)

to make it short, is there a way to register a script to unity when compilation fails? like an automated repair script or sth? or could a compilation pipeline script help me? where would I start there?

Found the answer here


Still kudos to you @dns :wink: