When trying to create a custom inspector I get the Cannot resolve symbol
errors until through "context actions" I tell it to reference the assembly UnityEditor.CoreModule v0.0.0.0 and import UnityEditor.whatever symbol I clicked on.
I tried putting some images here, but that requires reputation.
[CustomEditor(typeof(Spider))] <- Cannot resolve symbol "CustomEditor"
public class SpiderEditor : Editor <- Cannot resolve symbol 'Editor'
{
public override void OnInspectorGUI() <- almost everything else has the same error
{
base.OnInspectorGUI();
EditorGUILayout.Space(10);
Spider s = (Spider)target;
EditorGUILayout.CurveField(s.redLight, new Color(1, 0.15f, 0.15f), new Rect(0, 0, 150, 1));
}
}
These errors seem to be an error with the IDE, as it compiles just fine.
Additional info in case it is relevant:
One solution I found told me to disable "Use ReSharper Build", which seems to have made the script compile way faster for some reason, but the issue remains.
As this has happened many times, I doubt restarting my PC or any apps would solve it. I also haven't found many useful results when trying to google the issue.
It turns out I just needed to put the script inside a "Assets/Editor/" folder. No idea why it caused that weirdness. ¯\_(ツ)_/¯