Can't get Custom Editor to display

I have followed several tutorial on setting up a custom editor for components in Unity but all result in nothing changing in Unity. Any ideas what I’m missing? Thanks!


File: Assets\Editor\PlanetControllerInspector.cs

using UnityEditor;
using UnityEngine;

[CustomEditor(typeof(PlanetController))]
public class PlanetControllerInspector : Editor {

    public override void OnInspectorGUI()
    {
        GUILayout.Label("TEST");
    }
}

File: Assets\Scripts\PlanetController.cs

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlanetController : MonoBehaviour {

    public Camera Cam;

    public int MaxPlanetResolution = 3;

    public int QuadSize = 16;

    public int PlanetSize = 32;

    ....
}

Your code works, what exactly are you doing?

Btw: Consider enclosing your whole class with the #if UNITY_EDITOR compiler tag (including the using UnityEditor !):

#if UNITY_EDITOR
using UnityEditor;

[CustomEditor(typeof(TestScript))]
public class TestScriptGUI : Editor {

...

}
#endif

Otherwise you will get a compiler error as soon as you try to build your project.