Search Unity

Make a menu to add multiple players and set variables

Discussion in 'Getting Started' started by Skido07, Jun 28, 2020.

  1. Skido07

    Skido07

    Joined:
    Jun 25, 2020
    Posts:
    1
    I'm pretty new to Unity and trying to make a menu where I can set name and class of 2-8 players.
    I have seen this in multiple Games, but I can't find how to make it.
    The player names and classes more or less working, but I don't even know where to start with the rest.

    It is supposed to look something like the attached screenshot below, but only one "Add Player" Buttons should be shown at any time. The delete buttons should only show when there are more than two players. Also, If I delete the first Player the second should become the first, the third should become the second and so on.

    Hope you can help me or point me to resources that can.
    upload_2020-6-28_13-3-59.png
     

    Attached Files:

  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Well you'll need a script that has an array of button and field references, and shows them one at a time as needed. It's not a very complicated script.

    If you don't know how to code yet, you should probably put this project on pause while you go work through some C# (and then Unity scripting) tutorials.