Esempio n. 1
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        ItemComponent targ     = target as ItemComponent;
        EItemState    newValue = (EItemState)EditorGUILayout.EnumPopup(targ.state);

        if (newValue != targ.state)
        {
            targ.state = newValue;
            targ.SetObjectProperties();
            // do stuff, call functions, etc.
        }
    }