We just published a new examples package specifically targeted at Unity 5.
It contains the updated versions of all the examples from the previous package, with a renewed interface (now featuring the UI system introduced in Unity 4.6) and full compatibility with Unity's WebGL build (except the FPS example, which requires UDP communication, not available in WebGL).
The package contains these examples:
- Connector
- Lobby
- Buddy Messenger
- Tris
- Object Movement
- MMORoom Demo
- First Person Shooter
- SpaceWar
The download link available on this page: http://www.smartfoxserver.com/download/sfs2x#p=examples
PS
We will soon make the renewed examples available in the Unity Asset Store too, upgrading the current package.
Unity 5 examples package
Unity 5 examples package
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: Unity 5 examples package
A new example called Advanced Connector has been added to the Unity 5 examples package.
It expands the very basic Connector example, adding the logic needed to activate the protocol cryptography that was introduced in SmartFoxServer 2X starting from version 2.10. It also shows how to handle multiple Unity builds with a bit of conditional compilation.
It expands the very basic Connector example, adding the logic needed to activate the protocol cryptography that was introduced in SmartFoxServer 2X starting from version 2.10. It also shows how to handle multiple Unity builds with a bit of conditional compilation.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: Unity 5 examples package
All Unity tutorials in the SmartFoxServer 2X doc website have been updated to match the newly released examples:
http://docs2x.smartfoxserver.com/Exampl ... troduction
http://docs2x.smartfoxserver.com/Exampl ... troduction
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
-
ValeZumzum
- Posts: 1
- Joined: 09 Oct 2015, 19:51
Re: Unity 5 examples package
I tested the ObjectMovement Example in Unity 5.2.1 with WebPlayer platform and it works ok.
Nnow i'm trying to run it with WebGL. The login is working ok, but, when another player connects and moves, it throws an exception when trying to convert user.GetVariable("x").GetDoubleValue() to float (in the OnUserVariableUpdate method).
Debugging, I saw that the value returned by GetDoubleValue is 0, while debugging with WebPlayer the value is 0.0. I think that's why it can't cast that value to float.
Maybe it's a problem with the way the web socket handles the data?
Nnow i'm trying to run it with WebGL. The login is working ok, but, when another player connects and moves, it throws an exception when trying to convert user.GetVariable("x").GetDoubleValue() to float (in the OnUserVariableUpdate method).
Debugging, I saw that the value returned by GetDoubleValue is 0, while debugging with WebPlayer the value is 0.0. I think that's why it can't cast that value to float.
Maybe it's a problem with the way the web socket handles the data?
Re: Unity 5 examples package
Sorry for the late reply.
We will investigate in the next few days and report our findings.
We will investigate in the next few days and report our findings.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: Unity 5 examples package
Are you using the latest version of the example and API, or did you make any change to the code? Because in my tests I can't replicate the issue. I run two WebGL clients and Unity Editor at the same time and no exception is thrown.ValeZumzum wrote:I tested the ObjectMovement Example in Unity 5.2.1 with WebPlayer platform and it works ok.
Nnow i'm trying to run it with WebGL. The login is working ok, but, when another player connects and moves, it throws an exception when trying to convert user.GetVariable("x").GetDoubleValue() to float (in the OnUserVariableUpdate method).
Debugging, I saw that the value returned by GetDoubleValue is 0, while debugging with WebPlayer the value is 0.0. I think that's why it can't cast that value to float.
Maybe it's a problem with the way the web socket handles the data?
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team