/// <summary> /// Copy mesh data from another mesh to self. /// </summary> /// <param name="other"></param> public void CopyFrom(ProBuilderMesh other) { if (other == null) { throw new ArgumentNullException("other"); } Clear(); positions = other.positions; sharedVertices = other.sharedVerticesInternal; SetSharedTextures(other.sharedTextureLookup); facesInternal = other.faces.Select(x => new Face(x)).ToArray(); List <Vector4> uvs = new List <Vector4>(); for (var i = 0; i < k_UVChannelCount; i++) { other.GetUVs(i, uvs); SetUVs(i, uvs); } tangents = other.tangents; colors = other.colors; userCollisions = other.userCollisions; selectable = other.selectable; unwrapParameters = new UnwrapParameters(other.unwrapParameters); }
/// <summary> /// Creates a set of unwrap parameters by copying values from another set. /// </summary> /// <param name="other">The UnwrapParameters to copy properties from.</param> public UnwrapParameters(UnwrapParameters other) { if (other == null) { throw new System.ArgumentNullException("other"); } hardAngle = other.hardAngle; packMargin = other.packMargin; angleError = other.angleError; areaError = other.areaError; }