Making an object resolution-independent

I'm working on a GUI that doesn't use Untiy's GUI system. Instead, it's composed of objects rendered by a second camera. How do I make these objects resolution independent? I gave it a shot and came up with this code:

static public Vector3 GUIPosition(float x, float y) {
    GameObject GUICamObject  = GameObject.FindWithTag("GUICam");
    Camera GUICamera = GUICamObject.GetComponent<Camera>();

    Vector3 pos = GUICamera.ViewportToWorldPoint(new Vector3((x)/100,-(y-100)/100,9));
    return pos;
}

static public void Element(GameObject button, float x, float y) {
    Vector3 buttonPosition = GUIPosition(x, y);
    button.transform.position = buttonPosition;
}

But it doesn't do the trick; on higher resolutions, object positions tend to distort anyways. I'm obviously going about it wrong; what's the "right" way to make an object resolution independent?

Assuming the UI camera's projection is orthographic, you can make the orthographic size a fixed value. This gives you the height of the 'UI area'; the width can then be derived from the height and the aspect ratio.

Setting aside aspect ratio for the moment, since you can set the size of the orthographic projection yourself, there shouldn't be any issues with resolution independence as far as that goes. For example, say the orthographic size is 50, meaning that the height of the projection is 100. A UI element that's 25 units tall will then take up a quarter of the screen's heights regardless of resolution. This doesn't give you pixel-for-pixel graphics of course, but it does give you resolution independence.

In practice, aspect ratio complicates things of course, in that you may still have to do some dynamic positioning based on the width of the projection. But, that problem is more or less unavoidable regardless of what approach you take, I think.