I have a complete metric space $Y$, some non-metrizable(!) Hausdorff compactification $Z$ of it and a subspace $X \subset Y$.

Furthermore, I do have a uniformly continuous function $f$ on $X$. So there is a uniformly continuous extension of $f$ from $X$ to the closure of $X$ in $Y$.

Can we extend f to a uniformly continuous function on the closure of $X$ in $Z$?

For this we equip $Z$ with the unique uniform structure which all compact Hausdorff spaces posses.

It seems that this question boils down to the question whether the from $Z$ induced uniform structure on $X$ coincides with the one coming from the metric on $X$. But sadly, I can't answer this on my own since I'm not familiar with uniform spaces.

If the answer does depend on $Z$, I'm interested in $Z = \beta Y$ (the Stone-Cech compactification).