I’m currently building dlls for Unity 2018.4 and 2019.4 and am trying to add 2021.2 but it seems like something has changed with UnityEditor.dll references. I’m getting this error even though I have a reference to UnityEditor.dll (C:\Program Files\Unity\Hub\Editor\2021.2.0f1\Editor\Data\Managed\UnityEditor.dll):
Error CS0246 The type or namespace name ‘EditorWindow’ could not be found (are you missing a using directive or an assembly reference?)
Weirdly if I click on the error in Visual Studio it opens the file and immediately finds the reference and the error disappears!
I’ve tried referencing the UnityEditor.CoreModule.dll, the UnityEditor.UI.dll in ScriptAssemblies etc.
What am I missing?!