I'm trying to get the usernames from a room into an array so i can access them easily in Unity.
This is what i do:
Code: Select all
SmartFoxClient client = NetworkController.GetClient();
Hashtable users = new Hashtable();
using UnityEngine;
using System;
using System.Collections;
using SmartFoxClientAPI;
using SmartFoxClientAPI.Data;
using SmartFoxClientAPI.Util;
public class getUsers : MonoBehaviour {
SmartFoxClient client = NetworkController.GetClient();
Hashtable users = new Hashtable();
void Start ()
{
Room currentActiveRoom = client.GetActiveRoom();
Hashtable users = currentActiveRoom.GetUserList();
foreach(User u in users)
u.GetName();
}
This doesn't work at all.
Is there more info on how to construct this in C#.
All i can find is Actionscript.
Ed.