Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Unity UI Trying to make a simple chess board

Discussion in 'UGUI & TextMesh Pro' started by nohmdd, Dec 14, 2023.

  1. nohmdd

    nohmdd

    Joined:
    Mar 26, 2020
    Posts:
    1
    This should be basic 101 and yet I cannot wrap my ahead around the anchoring and scaling system.
    I'm trying to make a simple, responsive 2D chessboard for mobile that looks good horizontal or vertical.
    The panel representing the board background has margins and scales with the screen. It works great, no issues.
    The children black & white tiles on the other hand... They move outside the bounds when anchored to center of parent, start overlapping each other when anchored to corners of the parent, they stretch outside the bounds, stay within bounds but aren't big enough, etc etc.
    Do I simply need to set an anchor of a single point for each tile center? Do I have to split the tiles into 4 different quadrants?
    upload_2023-12-14_11-32-43.png

    upload_2023-12-14_11-36-10.png