Okay Basically... I'm the User of a PowerMac G5 and as some of u may know unity 3.x is not supported on the PPC Processor, which kinda sucks but i guess unity cant keep making support for older hardware. i've only just started using unity again as i had a lil break from it to go do other things. What i need is help with creating a basic multiplayer environment in unity 2.6.1 and using smartfox as a backend, i need it to interact with a mysql database for username and password login, and then just load a basic scene with cubes as the characters localplayer and remote player e.t.c. Now i've found many example projects offering this kind stuff and is exactly what i need to get my project started for example... http://forum.unity3d.com/threads/105926-Basic-Setup-Unity3d-Smartfoxserver2x?highlight=Login The only problem is the project files have been created in unity 3 which means when i cant open them. i would try to do this myself but smartfox doesnt really offer any really helpful documentation on doing mysql based logins with unity. Thanks for your time,
Im Using SFS 2X Currently with Unity 2.6.1 Currently.. what i have is a fork of the SFS2x FPS Demo.. i have chopped and changed quite alot with it to do what i want.. it's just the login im having trouble with.. i can see how to create a server side script for smartfox to interact with the database.. but where's the documentation on sending the request to the server and then recieveing it back in a Unity Environment. I Can only seem to find examples using AS3/Flash for custom logins. @appels - i found something interesting that you have made before.. would you consider sharing this with me? i see it uses SFS 1.6 which wouldnt be too much of a problem to change too as i have both installed in my Dedicated Server. http://forum.unity3d.com/threads/63493-Smartfox-test Thanks for your time
this doesnt really help me, ive written the server side login event handler but how do use it client side?
some code that will help : Code (csharp): sfClient.AddEventListener (SFSEvent.CONNECTION, OnConnectionHandler); sfClient.AddEventListener (SFSEvent.LOGIN, OnLoginHandler); sfClient.AddEventListener (SFSEvent.LOGIN_ERROR, OnLoginErrorHandler); sfClient.AddEventListener (SFSEvent.LOGOUT, OnLogoutHandler); public void OnConnectionHandler (BaseEvent evt) { bool success = (bool)evt.Params["success"]; if (success) { SmartFoxConnection.Connection = sfClient; sfClient.Send (new LoginRequest (username, password, zone)); } else { loginErrorMessage = "Unable to connect..."; .... public void OnConnectionLostHandler (BaseEvent evt) { UnregisterSFSSceneCallbacks(); loginErrorMessage = "Connection lost ..."; ..... public void OnLoginHandler (BaseEvent evt) { try { if (evt.Params.ContainsKey ("success") !(bool)evt.Params["success"]) { loginErrorMessage = (string)evt.Params["errorMessage"]; } else { sfClient.InitUDP (ServerIp, ServerPort); } } catch (Exception ex) { Debug.Log ("Exception handling login request: " + ex.Message + " " + ex.StackTrace); } } public void OnLoginErrorHandler (BaseEvent evt) { loginErrorMessage = (string)evt.Params["errorMessage"]; }