Example #1
0
 /// <summary>
 /// Copy polyline.
 /// </summary>
 /// <param name="element"></param>
 /// <returns></returns>
 public override LW_Element Copy(LW_Element element = null)
 {
     if (element != null && element is LW_Polyline3D)
     {
         element.CopyPropertiesFrom(this);
     }
     else
     {
         element = Copy(CreateInstance <LW_Polyline3D>());
         //element.UnregisterChildren();
         //element.RegisterChildren();
     }
     return(element);
 }
Example #2
0
        /// <summary>
        /// Creates a copy of this element or Copies the properties of this element on to a provided element.
        /// </summary>
        /// <param name="element">The element to apply this elements properties on to. if null a new element is created.</param>
        /// <returns></returns>
        public virtual LW_Element Copy(LW_Element element = null)
        {
                        #if UNITY_EDITOR || DEVELOPMENT
            if (s_Debug)
            {
                Debug.Log("Copy: " + name);
            }
                        #endif

            if (element != null)
            {
                element.CopyPropertiesFrom(this);
            }
            return(element);
        }