public override void OnInspectorGUI() { DrawDefaultInspector(); PatternItem patternItem = (PatternItem)target; if (patternItem.model != null && GUI.changed) { patternItem.UpdateModel(); } }