Search Unity

  1. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  2. Unity 2017.2 is now released.
    Dismiss Notice
  3. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  6. Unity 2017.3 beta is now available for download.
    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.8%
  3. Save the level , skills and inventory...

    151 vote(s)
    35.3%
  4. Character Customization

    91 vote(s)
    21.3%
  5. Teleportation portals

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

    37 vote(s)
    8.6%
  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,669
    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/