1. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  2. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  3. We’re giving 2017.1 beta testers a chance to win t-shirts and a Nintendo Switch. Read more on the blog.
    Dismiss Notice
  4. We want to know how you learned Unity! Help us by taking this quick survey and have a chance at a $25 gift card
    Dismiss Notice
  5. Are you an artist or level designer going to Unite Europe? Join our roundtables there to discuss artist features.
    Dismiss Notice
  6. Unity 5.6 is now released.
    Dismiss Notice
  7. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice

Multiplayer Kit

Discussion in 'Assets and Asset Store' started by Zerano, Nov 30, 2011.

?

Next Update?

  1. Collision

    50 vote(s)
    11.7%
  2. Day Night Cycle

    72 vote(s)
    16.9%
  3. Save the level , skills and inventory...

    151 vote(s)
    35.4%
  4. Character Customization

    90 vote(s)
    21.1%
  5. Teleportation portals

    13 vote(s)
    3.1%
  6. Basic GM commands

    36 vote(s)
    8.5%
  7. Resolution dependand GUI

    14 vote(s)
    3.3%
  1. inflame

    inflame

    Joined:
    Jul 31, 2014
    Posts:
    24
    Help to make a separate button input and the character to be displayed in 3D


    Code (CSharp):
    1. SelectCharacter();
    2.         }
    3.     }
    4.  
    5.     public void SendSelectedPlayer(string playerName) {
    6.         Room room = smartFox.LastJoinedRoom;
    7.         ISFSObject selectedPlayer= new SFSObject();
    8.         selectedPlayer.PutUtfString("selectedPlayerName", playerName);
    9.         ExtensionRequest request = new ExtensionRequest("selectedPlayer", selectedPlayer, room);
    10.         smartFox.Send(request);
    11.     }
    12.  
    13.     private void SelectCharacter(){
    14.         areaHeight=340;
    15.         int ScreenX = ((int)(Screen.width / 2) - (areaWidth / 2));
    16.         int ScreenY = ((int)(Screen.height / 2) - (areaHeight/ 2));
    17.         GUILayout.BeginArea (new Rect (ScreenX, ScreenY, areaWidth, areaHeight),"Login","Window");
    18.         GUILayout.Space(38);
    19.         pos=GUILayout.BeginScrollView(pos);
    20.         foreach(Player player in characterList){
    21.             if(GUILayout.Button(player.Name)){
    22.                 SendSelectedPlayer(player.Name);
    23.                 UnregisterSFSSceneCallbacks();
    24.                 Application.LoadLevel("game");
    25.             }
    26.         }
    27.         GUILayout.FlexibleSpace();
    28.         GUILayout.EndScrollView();
    29.         if(GUILayout.Button("Create new")){
    30.             CreateCharacter();
    31.         }
    32.         GUILayout.EndArea();
    33.     }
     
    Last edited: Feb 9, 2015
  2. Adam-Buckner

    Adam-Buckner

    Unity Technologies

    Joined:
    Jun 27, 2007
    Posts:
    5,612
    Please learn how to use code tags:
    http://forum.unity3d.com/threads/using-code-tags-properly.134625/

     
  3. inflame

    inflame

    Joined:
    Jul 31, 2014
    Posts:
    24
    Help to make a separate button input and the character to be displayed in 3D

    Code (CSharp):
    1. SelectCharacter();
    2.         }
    3.     }
    4.     public void SendSelectedPlayer(string playerName) {
    5.         Room room = smartFox.LastJoinedRoom;
    6.         ISFSObject selectedPlayer= new SFSObject();
    7.         selectedPlayer.PutUtfString("selectedPlayerName", playerName);
    8.         ExtensionRequest request = new ExtensionRequest("selectedPlayer", selectedPlayer, room);
    9.         smartFox.Send(request);
    10.     }
    11.     private void SelectCharacter(){
    12.         areaHeight=340;
    13.         int ScreenX = ((int)(Screen.width / 2) - (areaWidth / 2));
    14.         int ScreenY = ((int)(Screen.height / 2) - (areaHeight/ 2));
    15.         GUILayout.BeginArea (new Rect (ScreenX, ScreenY, areaWidth, areaHeight),"Login","Window");
    16.         GUILayout.Space(38);
    17.         pos=GUILayout.BeginScrollView(pos);
    18.         foreach(Player player in characterList){
    19.             if(GUILayout.Button(player.Name)){
    20.                 SendSelectedPlayer(player.Name);
    21.                 UnregisterSFSSceneCallbacks();
    22.                 Application.LoadLevel("game");
    23.             }
    24.         }
    25.         GUILayout.FlexibleSpace();
    26.         GUILayout.EndScrollView();
    27.         if(GUILayout.Button("Create new")){
    28.             CreateCharacter();
    29.         }
    30.         GUILayout.EndArea();
    31.     }
     
  4. stridervan

    stridervan

    Joined:
    Nov 11, 2011
    Posts:
    141
    I hope that anyone who is still interested in project to know that the project is now available as an open source. Please visit the game blog to find out how ....

    http://projectzoso.weebly.com/