Search Unity

Question How to center viewport of scrollview ?

Discussion in 'UGUI & TextMesh Pro' started by eshelshlomi1999, Apr 28, 2023.

  1. eshelshlomi1999

    eshelshlomi1999

    Joined:
    Apr 1, 2023
    Posts:
    17
    not sure how to do it and if I should do it by code or in the editor.

    the viewport as it is now in runtime. it's position more ot the left side:



    I can drag the viewport on the red and put it more or less manual in the center. but I want it to be automatic in the center.

    this screenshot is after dragging the red with the mouse: and this is how I want it to be automatic, when running the game that it will be in the center.



    this is the settings of the content: