- Home /
Smartfox Usernames?
how can I retrieve the usernames from smartfox into unity?
I managed to find my own username with :
public string myUserName
but how do I use:
public string GetName()
it seems to work different ...
can anyone help me out please???
been struggling with C# script for days lol
Comment
Answer by d.barcelos · Sep 30, 2010 at 06:18 PM
Would you like to retrieve the nicknames of users in the room? This is possible from the room variable e.g:
//C#
void OnJoinRoom (Room room)
{
room.GetUserList users = ();
}
where users type is Hashtable. God bless you.
Answer by WhiskeyJack · Oct 27, 2010 at 11:33 AM
If you're looking for the username of the player (that was used to login), you can use client.myUserName (where client is the SmartFoxClient). There is also a client.myUserId you might want to use.