Simple Extension

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

Posts: 13
Joined: 10 Apr 2010, 00:58

Simple Extension

Postby kidovate » 03 May 2010, 00:12

For the response from the server, how do you access it?

(in unity3d)

Is there just one example I could look at for the receiving?

This is really simple... Thanks!

Christian Stewart
Posts: 1
Joined: 06 May 2010, 21:17

Postby Kiyaku » 06 May 2010, 21:21

Take a look at "OnExtensionResponse(object data, string type)"

And add to "SubscribeEvents()" (using the Island Demo Code):
SFSEvent.onExtensionResponse += OnExtensionRespone;

Then you can read out your informations.
Posts: 15
Joined: 24 Mar 2010, 12:23

Postby shivafang » 08 May 2010, 12:14

I'm in about the same place you are, in the Start() of one of your scripts you need "SFSEvent.onExtensionResponse = OnExtensionResponse"

And you need a function OnExtensionResponce(res)
res will be of type Data.SFSObject (if you're working in boo, like I am, you'll want to use OnExtensionResponce(res as Data.SFSObject).. don't know about the other .Net languages.)

You can get fields out of the object using res.Get() for example res.Get("_cmd")

Let me know if you figure out how to send messages TO an extension, no one is answering me in my thread :(.

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 1 guest