private void RefreshTargets()
        {
            if (serializedObject.targetObject != null)
            {
                serializedObject.ApplyModifiedProperties();

                for (int i = 0; i < targets.Length; i++)
                {
                    QuickPolygon shape = (QuickPolygon)targets[i];
                    if (shape != null)
                    {
                        if (PrefabUtility.GetPrefabParent(shape.gameObject) != null ||
                            PrefabUtility.GetPrefabObject(shape.gameObject) == null)
                        {
                            shape.UpdateTransformType();
                            shape.RecalculateMesh();
                        }
                        EditorUtility.SetDirty(shape);
                    }
                }
            }
        }