Page 1 of 1

Simple Extension

Posted: 03 May 2010, 00:12
by kidovate
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

Posted: 06 May 2010, 21:21
by Kiyaku
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.

Posted: 08 May 2010, 12:14
by shivafang
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 :(.