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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How to create complicated UI structures

Discussion in 'UGUI & TextMesh Pro' started by MindSpyke, Jan 16, 2016.

  1. MindSpyke

    MindSpyke

    Joined:
    Sep 13, 2013
    Posts:
    14
    Hi i'm new to how the UI works in unity and I've been able to make some simple boxes with text with GUI.box()
    but I'm wondering how do you create UI elements with different sub-elements ??
    for example each element on a sepreate row , etc ? something like this...


    Thanks :)
     
  2. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Odylong: Hi there, check unity UI tutorials: https://unity3d.com/learn/tutorials/topics/user-interface-ui

    In short you have many options:

    1. Add and align separate text elements manually
    2. Add text elements and have them auto-aligned using one of list Layout Group components
    3. Have one text element, with split lines using enter
    4. Using rich text you can also have color tags to color characters/words
     
  3. MindSpyke

    MindSpyke

    Joined:
    Sep 13, 2013
    Posts:
    14
    I've also seen that Canvas is used for GUI structures , which one should I use best ? canvas or just GUI.box ?
     
  4. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,033
    Canvas is the newer, more efficient GUI.