Custom inspector doesn't set custom objects

I have a object named Grid and TowerMenu:

public class Grid : MonoBehaviour
{
    public TowerMenu TowerMenu;

    public void Start()
    {
        TowerMenu.Grid = this;
    }
}
public class TowerMenu
{
    public Grid Grid;
    public int a;
}

I want to edit the TowerMenu in Inspector so first I need to create it so I added the code in `Assests/Editor/TowerMenuEditor.cs`:

[CustomEditor(typeof(Grid))]
public class TowerMenuEditor : Editor
{
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();
        Grid Grid = target as Grid;
        Grid.TowerMenu = new TowerMenu();
    }
}

But I get NullReferenceException in Grid.Start about `TowerMenu = null` when I run my game, although the inspector should have created it.

What is the problem here?

you need to make your custom classes serializable if you want them to be saved in the inspector
http://unity3d.com/support/documentation/ScriptReference/Serializable.html

you need to make your class serializable if you want the inspector to save it
http://unity3d.com/support/documentation/ScriptReference/Serializable.html