Powerfull network solution for Unity3D
UCSS 1.0

Make client-server connection in several minutes!

Hey! First subscribers will receive this package for free! Hurry up!

Package will be ready soon. Enter your email address to receive updates about publishing day!

Simple
Import package, init protocol, subscribe for answers and do requests. It's so easy!

Flexible
Easy to switch between protocols and add your own. Management of requests queue.

Reliable
Restoring connections and resending data after breaks. Easy debugging!

Client-Server Solution for Unity3D (UCSS 1.0)

Rare Unity3D project manages without network part, while most of project are using server side for storing data, interchange of messages between users, gathering stats.

In Unity3D there are libraries for work with network (WWW and Network), but practice shows that it's far not enough.

That is why the solution for small and middle projects has been developed. It lets to use project's network and interact with server maximum easily, flexible and with minimum time for integration.

Unity client-server
  • single style of requests for protocols and data formats
    and simple interchange between protocols and formats
  • easily add new protocols and formats
    without changing methods of responses processing
  • full-duplex client-server communication
    websockets/socketIO/SockJS
  • management of requests orders
    consequentially, consequentially with stopping due to error, free queue
  • stability
    permanent internet connection check is possible
  • ready server
    there are ready examples of server side for each format
  • convenient instrument for debugging
    debugging of network communications is not a simple task
Advantages of using Unity3D CSS

Using Unity3D CSS in your project, the communication between client and server can easily be built during several hours, not several days.

UCSS 1.0 protocols and formats:
  • HTTP/HTTPS
  • REST
  • AMF (Action Message Format)
  • Websockets (ws/wss)
  • SocketIO
  • SockJS
How to use UCSS 1.0 (examples):

Download texture (avatar for example):

UCSS.HTTP.GetTexture(avatarURL, 
	new EventHandlerHTTPTexture(ApplyTexture), 
	new EventHandlerHTTPError(OnHTTPRequestFail));


Send stats (to REST API server):

UCSS.InitService(UCSSprotocols.rest, UCSSservices.StatisticsServer, statsServerHost, 
	new EventHandlerServiceInited(this.OnServiceInited), 
	new EventHandlerServiceError(this.OnServiceError));
...
void OnServiceInited()
{
	UCSS.GetService(UCSSservices.StatisticsServer).SetFormat(UCSSRestFormats.json);
	// now we can send
	RequestData requestData = new RequestData();
	requestData.service = "UserStats";
	requestData.method = "Runs";
	Dictionary<string, object> data = new Dictionary<string, object>();
	data.Add("userId", User.id);
	data.Add("time", Timer.time);
	requestData.data = data;
	UCSS.DoRequest(UCSSservices.StatisticsServer, requestData);
}


Send player's move (ws or socketIO or SockJS server):

UCSS.InitService(UCSSprotocols.ws, UCSSservices.GameServer, Config.gameServerHost, 
	new EventHandlerServiceInited(this.OnServiceInited), 
	new EventHandlerServiceError(this.OnServiceError));
...
void SendTurn()
{
	// send players turn to server
	RequestData requestData = new RequestData();
	requestData.service = "Turns";
	requestData.method = "Finish";
	Dictionary<string, object> data = new Dictionary<string, object>();
	data.Add("userId", User.id);
	data.Add("turnData", User.turn.ToJsonString());
	requestData.data = data;
	UCSS.DoRequest(UCSSservices.GameServer, requestData, new EventHandlerResponse(this.OnTurnSent));
}
							
void OnTurnSent()
{
	// do some stuff
}


Receiving commands from server (for example, opponent's moves). ws or socketIO or SockJS only:

// subscription on command from server (one time):
UCSS.SubscribeOnServerCommand(UCSSservices.GameServer, "UpdatePlayersPositions", 
	new EventHandlerServiceCommand(this.UpdatePlayersPositions));
...
void UpdatePlayersPositions(object CommandData)
{
	// update players positions from server
	...
}

First subscribers will receive this package for free! Hurry up!

Package will be ready soon. Enter your email address to receive updates about publishing day!


Please, contact me if you have any questions or proposals. Click "Contact me" below :)