Since today all my custom inspector scripts report missing type or namespace issues. As a test, i created these:
- Temp.cs
- Editor/TempEditor.cs
looking like this:
using UnityEngine;
public class Temp : MonoBehaviour
{
public int testA = 1;
public float testB = 2;
}
using UnityEngine;
using UnityEditor;
[CustomEditor(typeof(Temp))]
public class TempEditor : Editor
{
// OnInspector GUI
public override void OnInspectorGUI()
{
Temp temp = (Temp)target;
base.DrawDefaultInspector();
}
}
Very basic. Both scripts works flawless in Unity, but Visual Studio 2019 Community gives me errors:
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'Temp' could not be found (are you missing a using directive or an assembly reference?) Assembly-CSharp-Editor D:\Projects\UnityProjects\LordOfDarkness\Assets\Gameplay\Scripts\Temp\Editor\TempEditor.cs 4 Active
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'Temp' could not be found (are you missing a using directive or an assembly reference?) Assembly-CSharp-Editor D:\Projects\UnityProjects\LordOfDarkness\Assets\Gameplay\Scripts\Temp\Editor\TempEditor.cs 10 Active
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'Temp' could not be found (are you missing a using directive or an assembly reference?) Assembly-CSharp-Editor D:\Projects\UnityProjects\LordOfDarkness\Assets\Gameplay\Scripts\Temp\Editor\TempEditor.cs 10 Active
What is going on here? I checked all over the internet and haven’t found anything that helped me further. I’m hardly an experience C# developer, so this is really difficult for me.