SmartFoxServer Unity/.NET API
SendObjectToGroup Method (obj, userList, roomId)
NamespacesSmartFoxClientAPISmartFoxClientSendObjectToGroup(SFSObject, ArrayList, Int32)
Send an SFSObject to a group of users in the room. See SendObject(SFSObject, Int32) for more info.
Declaration Syntax
C#Visual BasicVisual C++
public void SendObjectToGroup(
	SFSObject obj,
	ArrayList userList,
	int roomId
)
Public Sub SendObjectToGroup ( _
	obj As SFSObject, _
	userList As ArrayList, _
	roomId As Integer _
)
public:
void SendObjectToGroup(
	SFSObject^ obj, 
	ArrayList^ userList, 
	int roomId
)
Parameters
obj (SFSObject)
the SFSObject to be sent.
userList (ArrayList)
an ArrayList containing the id(s) of the recipients.
roomId (Int32)
the id of the target room, in case of multi-room join (optional, default value: activeRoomId).
Remarks

Sends:
SFSEvent..::.OnObjectReceivedDelegate

Version:
SmartFoxServer Basic / Pro

Examples
The following example shows how to send a simple object with primitive data to two users.
CopyC#
  SFSObject move = new SFSObject();
  move.Put("x", 150);
  move.Put("y", 250);
  move.Put("speed", 8);
  smartFox.SendObject(move);

ArrayList userList = new ArrayList();
userList.Add(11);
userList.Add(12);

            smartFox.SendObjectToGroup(move, userList);
See Also

Assembly: SmartFoxClient (Module: SmartFoxClient) Version: 1.2.4.0 (1.2.4.0)