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

How can i build a list for the player to choose from?

Discussion in 'Editor & General Support' started by kha_erp, Sep 21, 2014.

  1. kha_erp

    kha_erp

    Joined:
    Sep 21, 2014
    Posts:
    13
    I need to know how can i build a list inside the game As the list of buildings in strategy games, or as the friends list in SimCity .. !!
     
  2. Jmanpie

    Jmanpie

    Joined:
    Oct 7, 2012
    Posts:
    132
    kha_erp likes this.
  3. kha_erp

    kha_erp

    Joined:
    Sep 21, 2014
    Posts:
    13
    Thanks Jmanpie, Do you think i have to use OnGui to show this array to the player !
     
  4. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    You can use whatever system you want. OnGUI is pretty simple, but isn't always the most attractive.
     
    kha_erp likes this.
  5. kha_erp

    kha_erp

    Joined:
    Sep 21, 2014
    Posts:
    13
    so what can i use to build this list !
     
  6. Suddoha

    Suddoha

    Joined:
    Nov 9, 2013
    Posts:
    2,824
    In the script i would simply go the way that Jmanpie has suggested. Have a look at arrays or dynamic lists.

    Everything else is up to your own desire and design, how you want to present the selectable items to your users.
    You could offer GUI-buttons to click on (text only, with textures, or whatsoever), you could use planes/sprites as buttons or even meshes which you can preview/rotate and click on.

    You've got total freedom there, that's a matter of design/usability.
     
    kha_erp likes this.