2. If $x^{2}+y^{2}=1$, then
$$
\sqrt{x^{2}-2 x+1}+\sqrt{4 y^{2}+4 y+1}+\sqrt{x y-2 x+y-2}
$$

is ( ).
(A) 0
(B) 1
(C) 2
(D) 3
2. D.

From the conditions, we know that $-1 \leqslant x \leqslant 1, -1 \leqslant y \leqslant 1$, and
$$
\begin{array}{l}
x y-2 x+y-2 \geqslant 0 \\
\Rightarrow(x+1)(y-2) \geqslant 0 .
\end{array}
$$

Since $y-2<0, x+1 \geqslant 0$, therefore,
$$
x+1=0 \Rightarrow x=-1 \text {. }
$$

Thus, $y=0$.
Therefore, the original expression $=2+1+0=3$.