I just test-drove the API and it looks sweet, after loading the test project I just had to enter my server's url and it connected on the very first attempt, so congrats!
And now for the critics... I'm giving you my comments as they came while testing (I've only little practice with the Flash version of SFS so pardon me if some remarks are dumb) (BTW, do you by any chance come from Flash? The way you organize the game objects --layers ?, and the syntax you use makes me think so...).
- Connection attempts aren't asynchronous and lock up the game... there should be a way to use coroutine sweetness.
- OnConnection isn't fired if connection fails... (try with wrong port)
- OnApplicationQuit isn't fired in the editor, so disconnection doesn't occur.
- anyway SmartFoxClient should clean itself up IMO, maybe by implementing a destructor, or System.IDisposable?
This way you wouldn't even need a manager in the scene, all static! - I was surprised by the way you use events... I actually didn't know you could += a delegate without new EventHandler(method)!
Thanks for the tip, it's cleaner code! Also, so cool to see real events in Unity, I'm so sick of the SendMessage() madness... but don't events cause you problems? I'm thinking in particular of the webplayer.
- renamed GameManager (too generic) to SmartFox, removed the useless 'instance'.
- made Get/SetSmartFoxConnection() into a static property: Connection.
- In the same way room.Get/SetName() could become room.name (*), smartFox.IsConnected() => smartFox.isConnected, etc.
- ConnectionGUI: exposed serverName & serverPort (now an int) so you can configure it in the editor.
- overall, I cleaned up the code a bit:
- removed 'using System' (I don't like having this because it creates an ambiguous reference between System.Object and UnityEngine.Object)
- String => string, Boolean => bool
- event handlers don't need to be public
By .NET standards a property should be called ie room.Name, whereas Unity conventions favor room.name... depends on what audience you're aiming for.
I'd be happy to do it (VS refactoring makes this easy) but I suppose the code I downloaded is already obsolete...
That's it for today... I can't wait to use SFS in our game, users have been asking for a pre-match lobby for a while and SFS would be perfect for this!