Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Why all the items in the Canvas reseting the coordinate Y?

Discussion in 'UGUI & TextMesh Pro' started by Rubenson84, Jul 28, 2023.

  1. Rubenson84

    Rubenson84

    Joined:
    Jul 28, 2023
    Posts:
    2
    Hi,

    I am starting learning Unity and have a problem with a gameplay Canvas.

    Not sure why when I close the project and then opening again, all the coordinates "y" position are getting reset and all the items appear at the top. This is only happening for one particulat Canvas.

    Why that can be happening?

    Thanks,
    Ruben.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,563
    Perhaps bad anchoring or layout?

    Here are some notes on UI Anchoring, Scaling, CanvasScaler, etc:

    https://forum.unity.com/threads/inc...size-between-two-people.1130146/#post-7261747

    https://forum.unity.com/threads/game-ui-button-size-problem.1142650/#post-7337383

    Usually you need to choose a suitable ScaleMode and MatchMode in the Canvas Scaler and stick with it 100%. Generally if you change those settings you will often need to redo your UI entirely.

    I also use this
    CanvasScalerOrientationDriver
    utility to make sharing UI for Landscape / Portrait easier. Read what it does carefully.

    https://gist.github.com/kurtdekker/8802b1b6c708637398f8c9167641efd3
     
  3. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    10,977
    If you are on 2022 "LTS", there was / is a bug that did that. In general I think new Unity versions ("LTS" even) are so buggy, even in features that are not getting worked on, that we should not so easily conclude that issues are user errors.

    Not sure if the fix has landed in a public release yet: https://issuetracker.unity3d.com/is...-loaded-when-opening-the-project-slash-player

    If you are learning Unity and want to deal with less buggy bullshit, I would stick with 2021 LTS for a year or so.
     
    Rubenson84 likes this.
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,468
    Please post UGUI (UI)questions on the UGUI forum not the 2D forum.

    I'll move your post for you.

    Thanks.
     
  5. Rubenson84

    Rubenson84

    Joined:
    Jul 28, 2023
    Posts:
    2
    Thanks a lot AcidArrow! I habe restored the version to 2021 and now it is working perfectly!