Example #1
0
        /// <summary>
        /// Creates a new object that is a copy of the current instance.
        /// </summary>
        /// <returns>
        /// A new object that is a copy of this instance.
        /// </returns>
        /// <filterpriority>2</filterpriority>
        public object Clone()
        {
            StyleProperty clone = new StyleProperty
            {
                Name           = Name,
                Type           = Type,
                SerializedType = SerializedType,
                // #####
                Int             = Int,
                Bool            = Bool,
                Float           = Float,
                String          = String,
                Color           = Color,
                LayerMask       = LayerMask,
                Enum            = Enum,
                Vector2         = Vector2,
                Vector3         = Vector3,
                Rect            = Rect,
                Char            = Char,
                AnimationCurve  = AnimationCurve,
                Bounds          = Bounds,
                Gradient        = Gradient,
                Quaternion      = Quaternion,
                ObjectReference = ObjectReference
            };

            return(clone);
        }
Example #2
0
 /// <summary>
 /// Creates a new object that is a copy of the current instance.
 /// </summary>
 /// <returns>
 /// A new object that is a copy of this instance.
 /// </returns>
 /// <filterpriority>2</filterpriority>
 public object Clone()
 {
     StyleProperty clone = new StyleProperty
     {
         Name = Name,
         Type = Type,
         SerializedType = SerializedType,
         // #####
         Int = Int,
         Bool = Bool,
         Float = Float,
         String = String,
         Color = Color,
         LayerMask = LayerMask,
         Enum = Enum,
         Vector2 = Vector2,
         Vector3 = Vector3,
         Rect = Rect,
         Char = Char,
         AnimationCurve = AnimationCurve,
         Bounds = Bounds,
         Gradient = Gradient,
         Quaternion = Quaternion,
         ObjectReference = ObjectReference
     };
     return clone;
 }