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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Objects appearing to the side instead of below

Discussion in '2D' started by theo9743, Mar 9, 2020.

  1. theo9743

    theo9743

    Joined:
    Feb 18, 2020
    Posts:
    12
    Hi guys, I was following a tutorial about creating a high-score system with the help of SQLite, the specific video I'm currently using is this:


    When I Instantiate each high score to display on the screen, instead of the objects being placed below each other they are placed to the right hand side, going off the screen. Apologies if it's too vague, I can provide screenshots/code snippets but I expect it's something to do with the canvas settings?

    I would appreciate any input

    Thanks,
    Theo
     
  2. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Hi @theo9743

    What is the part that is related to 2D?

    This sounds more like a UI question... if something is flat it doesn't automatically mean it is a 2D question ;)

    Anyway you didn't either provide any time code for the video (where in video he shows how he does the layout) and I didn't spot it with 10 or so clicks, so I have no idea... but I would use vertical layout group.
     
    theo9743 likes this.
  3. theo9743

    theo9743

    Joined:
    Feb 18, 2020
    Posts:
    12
    Hi sorry about that, I was worried I may have put the question in the wrong area!

    The timestamp for the referenced code is at 21:08, I will give the vertical layout group a go! Although he manages to do it with the Grid Layout Group strangely enough.

    Thanks!
     
  4. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    @theo9743

    I didn't see anything related to layout at that time.
     
    theo9743 likes this.
  5. theo9743

    theo9743

    Joined:
    Feb 18, 2020
    Posts:
    12
    Solved my issue! Thank you!! (using the vertical layout instead)