Custom inspector: uniformly display all instances of a custom class

I had the hardest time summarizing my question, so apologies for the vague title.

Basically I’ve created a custom class and I’d like to display all instances of it in the inspector. I can do this manually for each instance of the class, but doing so would be painfully redundant…

More specifically, my custom class contains some of the following code:

public class Base {

     public class Parameter {
          public string uiName;
          public string uiDescription;
          public float val;

          public Parameter (string _uiName, string _uiDescription, float _val) {
               uiName = _uiName;
               uiDescription = _uiDescription;
               val = _val;

     public Parameter parameter = new Parameter("Name", "This is a description", 10f);

And in my custom inspector:

Base b = (Base)target;
GUIContent parameter = new GUIContent(, b.parameter.description);
b.parameter.value = EditorGUILayout.FloatField(parameter, b.parameter.value);

Ok after some more research it looks like PropertyDrawers accomplish what I want to do. I did have to move the Parameter class out of the Base class though.

using UnityEngine;
using UnityEditor;

public class ParameterDrawer : PropertyDrawer {

	public override void OnGUI (Rect position, SerializedProperty property, GUIContent label) {
		EditorGUI.BeginProperty (position, label, property);
		// Label
		label.text = property.FindPropertyRelative("uiName").stringValue;
		label.tooltip = property.FindPropertyRelative("uiDescription").stringValue;
		position = EditorGUI.PrefixLabel (position, GUIUtility.GetControlID (FocusType.Passive), label);
		// Draw fields
		Rect valRect = new Rect (position.x, position.y, 50, position.height);
		EditorGUI.PropertyField (valRect, property.FindPropertyRelative("val"), GUIContent.none);
		EditorGUI.EndProperty ();