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

Are there alignment tools?

Discussion in 'Getting Started' started by tleylan, Jul 2, 2023.

  1. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    521
    I was wondering if there are alignment tools that I've missed (or 3rd party ones). I'm imagining an edit-time grid (or something) that I could "center" buttons on or align to top (so the buttons rested on another game object). Visual editing means spinning the world around to see if something is exactly centered and/or I have to calculate the absolute position.
     
  2. ijmmai

    ijmmai

    Joined:
    Jun 9, 2023
    Posts:
    188
    There is a lot you can do with Vertical/Horizontal Layout Groups components.
     
  3. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    521
    Such layout groups are limited to UI elements right? The buttons in my case (and they don't have to be buttons) aren't UI buttons. In another example I just noticed that a "pedestal" is floating off the ground when I intended to have it sitting on the ground.

    I think the folks who are good at this follow some best practices. I spend a bit too much time trying to line things up.
     
  4. ijmmai

    ijmmai

    Joined:
    Jun 9, 2023
    Posts:
    188
    My bad, I read buttons and thought UI.
    Do you have ProGrids installed? It is not exactly what you want, but does help by snapping to grid.
     
  5. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    521
    I've heard of ProGrids but haven't really used it. I'm looking into it now, thanks.

    Speaking of UI however :D that's another issue I run into. On a tabbed UI all the controls show all the time (while editing). I disable/enable tabs while editing them but this is a slow process as well. And one has to remember to enable them all before the final save. In another project I ended up aligning the tabs outside of their actual placement so I could easily see the child objects and then aligned them properly at app start up. I'm just wondering what the experts do.
     
  6. ijmmai

    ijmmai

    Joined:
    Jun 9, 2023
    Posts:
    188
    I had the same problem, forgetting to set all "pages" of the menu active. Since I already had a script attached to each page, to set the type, it was easy to add an awake function that sets the page active by default.
    An other script then takes over and activates and deactivates pages as needed.
     
    tleylan likes this.