Search Unity

Unity UI Some advice about setup for simple boardgame interface

Discussion in 'UGUI & TextMesh Pro' started by ZoidbergForPresident, May 8, 2019.

  1. ZoidbergForPresident

    ZoidbergForPresident

    Joined:
    Dec 15, 2015
    Posts:
    157
    Hi,

    I'm meddling with some adaptation of a relatively recent boardgame (Welcome to your perfect home), personal exercise (for now).

    I was wondering how to setup the board once in play.

    FYI, here is the board on paper: https://www.bluecocker.com/jeux/Welcome/Feuille_score.pdf

    My idea was to display ladscape 16/9 but showing the houses by default.

    Then by some input the score part would come from the bottom and display on top of the houses.

    I've edited the board to have two images with transparent zones. I'm using the full image (third, unedited), displayed this way: Canvas>Panel>Board>FullBoard (Image). Only the houses part are showing.

    Now I'm wondering how to build the canvas game object to allow the score board image/panel to come up on top of currently displayed houses.

    Thanks for the help, I'm a noob at UI so I'm gauging what is usually done in those cases.
     
  2. ZoidbergForPresident

    ZoidbergForPresident

    Joined:
    Dec 15, 2015
    Posts:
    157
    Hello? Anyone?

    My current setup is as is:

    > Canvas
    >> ScrollRect
    >>> Image

    All I want to do for now is have the image take all the room horizontally and be able to scroll it up and down.
    I can't make it work, especially I can't align the prefab version with the one in my scene, I have much trouble wrapping my head around the way Unity UI works here.

    Any help?
     
  3. ZoidbergForPresident

    ZoidbergForPresident

    Joined:
    Dec 15, 2015
    Posts:
    157
    OK, got something related in the forum, for anyone interested in this in the future.

    On the content GO, use a GridLayoutGroup and a ContentSizeFitter. It helps keeping things as I described in the OP.

    It is annoying that we don't have the same presentation in the prefab editor and in the scene, because the canvas scale is 1 in the editor but around .6 in the scene. The content/picture overflows in the prefab editor window...