- Home /
Question by
gn00422000 · Apr 26, 2012 at 05:35 PM ·
smartfoxsmartfoxserver
how to parse the SFSObject from the paramemter(smartfox server))
I send a message with SFSObject to smartfox server
void public SendMessageToOther(SFSObject dataObj) {
Room room = smartFox.LastJoinedRoom;
smartFox.Send(new PublicMessageRequest(dataObj.GetUtfString("type").ToString()+":"+dataObj.GetFloat("PositionIdx").ToString(),dataObj));
}
when I use the following script to parse the response data. I get message from parameter but I cant parse the SFSObject from the parameter
void OnPublicMessage(BaseEvent evt) { try { string message = (string)evt.Params["message"]; User sender = (User)evt.Params["sender"];
// We use lock here to ensure cross-thread safety on the messages collection
lock (messagesLocker) {
messages.Add(sender.Name + " said " + message);
}
ISFSObject dt = (SFSObject)evt.Params["params"];
}
How can I get the ISFSObject of the parameter?
Comment
Your answer
Follow this Question
Related Questions
How can I connect unity to my smart fox server plugin 1 Answer
not able to connect to sfs(smartfox) server? 0 Answers
How to delete rooms in smartfox using C# 0 Answers
Get the SFSObject from parameter (Smartfox server) 1 Answer
Smartfox login error 0 Answers