public override void OnInspectorGUI() { base.OnInspectorGUI(); GroupPile group = target as GroupPile; if (@group != null) { float itemWitdh = EditorGUILayout.FloatField("组牌单位的宽度:", @group.GroupItemWidth); float itemHeight = EditorGUILayout.FloatField("组牌单位的高度:", @group.GroupItemHeight); int fourY = EditorGUILayout.IntField("组牌中的第四张,Y轴偏移", @group.FourOffsetY); if (!itemHeight.Equals(@group.GroupItemHeight)) { @group.GroupItemHeight = itemHeight; } if (!itemWitdh.Equals(@group.GroupItemHeight)) { @group.GroupItemWidth = itemWitdh; } if (!fourY.Equals(@group.FourOffsetY)) { @group.FourOffsetY = fourY; } } serializedObject.ApplyModifiedProperties(); }