Pony Express Documentation

Unity Client

Demo Server

Networking/ClientSettings.cs

This is the class that is responsible for connecting your clients to your server. Connection state is managed with this object, and the object will persist throughout the life of the application until the Shutdown() method is called. Incoming messages and outgoing messages will use this class to communicate with the server.

Networking/ProcessMessageBase.cs

This abstract base class defines the correct patterns to follow to create your own Messaging class. Any class you use for your messages should inherit from this base class.

Networking/DefaultMessaging.cs

This is an example class demonstrating how messages can be sent to the server and read back from the server. The static methods: WhoAmI() and SendChat() are used in SampleMainMenu.cs and ChatClient.cs to show how messages can be sent to the server from your application's code. The ProcessServerNetworkMessage() fires every time a message comes from the server, and should call whatever part of your application you want when new server messages come in. Please see an example for more information on creating and reading messages to and from the server Here ».

Networking/ServerNetworkMessage.cs

This serves as our contract between the client and server, defining the structure of messages. All messages are sent as UTF-8, and are pipe-delimited string arrays. The first string in the message is always the unique Message Type ID, telling the client or server how to parse the message it is currently processing.

Networking/ChatClient.cs

This is the sample Chat Client utility. Attach this script to your main camera to add chat to your application.

SampleMainMenu/SampleMainMenu.cs

This is an example of a scene that can be followed to implement the Pony Express networking utility. See a YouTube video with this class in action: Here »

Plugins

The Plugins folder added to the root of your project has several files inside. These are necessary for network connectivity with iOS and Android devices - and also with Web GL clients. Please e-mail NewMoonLegacy@gmail.com with any questions or concerns you may have with any of these components.