Search Unity

Using Gui to display Photon Network rooms.

Discussion in 'Immediate Mode GUI (IMGUI)' started by VirusXProgramming, Feb 17, 2015.

  1. VirusXProgramming

    VirusXProgramming

    Joined:
    Nov 15, 2014
    Posts:
    67
    Hi,
    Im using the built in unity GUI for Displaying and creating rooms.
    I was wondering if I could some how use a slider(GUILayout.VerticalSlider)and make the GUI display the rooms. Also next to that a text field with a button underneath to create a room with a name of what was in the text field.
    Here is my code so far(the part that displays the GUI)
    Code (CSharp):
    1. if (joinedLobby = true) {
    2.             GUILayout.BeginArea(new Rect(Screen.height,100,Screen.width,0));
    3.             foreach(rl in RoomInfo){
    4.                 //I don't KNOW!!!
    5.             }
    6.  
    7.         }

    Thanks in Advance!


    Anything else that you need just ask.
     
  2. VirusXProgramming

    VirusXProgramming

    Joined:
    Nov 15, 2014
    Posts:
    67

    Im getting an error:

    Assets/Scripts/Networking.cs(95,25): error CS0230: Type and identifier are both required in a foreach statement
    Assets/Scripts/Networking.cs(102,37): error CS1547: Keyword `void' cannot be used in this context
    Assets/Scripts/Networking.cs(102,38): error CS1525: Unexpected symbol `(', expecting `)', `,', `;', `[', or `='
     
  3. VirusXProgramming

    VirusXProgramming

    Joined:
    Nov 15, 2014
    Posts:
    67
  4. VirusXProgramming

    VirusXProgramming

    Joined:
    Nov 15, 2014
    Posts:
    67
  5. VirusXProgramming

    VirusXProgramming

    Joined:
    Nov 15, 2014
    Posts:
    67
  6. VirusXProgramming

    VirusXProgramming

    Joined:
    Nov 15, 2014
    Posts:
    67