This popped up in a thread recently. The C# version of the example code for PropertyDrawer dosn’t work:
using UnityEngine;
using System.Collections;
public enum IngredientUnit { Spoon, Cup, Bowl, Piece }
// Custom serializable class
public class Ingredient
{
public string name;
public int amount = 1;
public IngredientUnit unit;
}
public class ExampleClass : MonoBehaviour
{
public Ingredient potionResult;
public Ingredient[] potionIngredients;
}
The example goes on to write a customPropertyDrawer for Ingredient, but since Ingredient isn’t marked as [Serializable], it won’t show up in the inspector, with or without the drawer.
Probably caused by automatic translation from UnityScript, where the [Serializable] tag is not neccessary.