How do I find the world coordinate of a pixel?

I making a 2D game. The left 1/4 of the screen is a UI panel showing game stats. The right 3/4 of the screen is a view port showing a portion of the game play field. To start the game, I would like to place the player in the center of the view port. I could eyeball it using the Unity editor, but I would prefer to do it in script (C#). The UI panel’s canvas is in Screen Space - Overlay Render Mode.

I found the panel’s width in myPanel.GetComponent().rec.width. This appears to be in pixel units. I need to offset the player by a relative number of world units. Is there a Unity library function available to perform this conversion?

Thanks!

(Yes, this is my first game.)

Here’s how I ended up solving this.

In a script on the main camera, in Start():

RectTransform ltp_rt = GameObject.Find("LeftTopPanel").GetComponent<RectTransform>();

Vector3 centeredScreenPosition = new Vector3(
    (Screen.width - (ltp_rt.position.x + (0.5f * ltp_rt.rect.width))) / 2,
    Screen.height / 2,
    0);

Vector3 centeredPosition = camera.ScreenToWorldPoint(centeredScreenPosition);

transform.position = new Vector3(centeredPosition.x, centeredPosition.y, -10);

lpt_rt is the RectTransform of the UI panel that takes up the left 1/4 of the screen. Do the math in screen coordinates. Then convert the screen coordinate to a world coordinate
before applying to the camera postion.