Display Dictionary with a class in the inspector?

I have a Dictionary with waypoints for my nav mesh agent, and I want him to do multiple operations on the waypoints and the ability to set this in the inspector.

I know how to get a dictionary to show up in the inspector, but not with its own class and properties.

The data looks like this:

public class Operations
{
    public LoadOperation loadOperation;
    public UnloadOperation unloadOperation;

    public enum LoadOperation
    {
        NoLoading,
        Load
    }

    public enum UnloadOperation
    {
        NoUnloading,
        Unload
    }
}

[Serializable]
    public class WaypointList
    {
        public Transform waypoint;
        public Operations operation;
    }

// Holds the list of waypoints and their operation
    [SerializeField]
    private List<WaypointList> waypointList;

// The list of operations for each waypoint
    private Dictionary<Transform, Operations> operationsList;

private void Awake()
    {
        // Create an in editor friendly array with waypoints and the operations for each
        operationsList = new Dictionary<Transform, Operations>();
        foreach (WaypointList entry in waypointList) {
            operationsList.Add(entry.waypoint, entry.operation);
        }
    }

Right now it only shows me the waypoints in the array because editor can’t read the class…

So in the inspector I want to set the waypoints in an array, drag the transform on to the waypoint, then set the one or multiple operations to execute on this waypoint.

In Unity - Scripting API: SerializeField
Serializable types are:

  • All classes inheriting from UnityEngine.Object, for example GameObject, Component, MonoBehaviour, Texture2D, AnimationClip.
  • All basic data types like int, string, float, bool.
  • Some built-in types like Vector2, Vector3, Vector4, Quaternion, Matrix4x4, Color, Rect, LayerMask.
  • Arrays of a serializable type
  • List of a serializable type)
  • Enums
  • Structs

Try:
http://wiki.unity3d.com/index.php/SerializableDictionary

Oh boy that is a lot of code. However the screenshot only shows Key, Value pairs. I want it to look something like this:

+------------+------------------------------------+-------------------+
| Waypoint 1 | Transform                          |                   |
+------------+------------------------------------+-------------------+
|            | LoadOperation (Operations class)   | Load (enum)       |
+------------+------------------------------------+-------------------+
|            | UnloadOperation (Operations class) | Unload (enum)     |
+------------+------------------------------------+-------------------+
| Waypoint 2 | Transform                          |                   |
+------------+------------------------------------+-------------------+
|            | LoadOperation (Operations class)   | No loading (enum) |
+------------+------------------------------------+-------------------+
|            | UnloadOperation (Operations class) | Unload (enum)     |
+------------+------------------------------------+-------------------+
| Waypoint 3 | Transform                          |                   |
+------------+------------------------------------+-------------------+
|            | LoadOperation (Operations class)   | Load (enum)       |
+------------+------------------------------------+-------------------+
|            | UnloadOperation (Operations class) | No unload (enum)  |
+------------+------------------------------------+-------------------+