3.0.0
- NEW: DataNode is now fully capable of serializing entire hierarchies of game objects, making it trivial to export and save entire game objects, complete with mesh and texture information embedded in the data. TNet will keep references to items in the Resources folder and will include the raw data of those that aren't. Example usage: where you were using prefabs before you can now use exported DataNode binaries, making this data easily moddable (remember, Resources.Load only works on internal content!)
- NEW: TNet now seamlessly supports instantiation of DataNode-exported objects as if they were prefabs both via TNManager.Instantiate as well as manually via DataNode.Instantiate().
- NEW: Added support for multiple simultaneous channel subscriptions. You can now enter and leave multiple channels at will, effectively creating streamed content.
- NEW: Added the ability to seamlessly transfer instantiated objects from one channel to another.
- NEW: Added a new example showing multiple channel support and the ability to transfer objects.
- NEW: Added the LZMA library to TNet in order to support LZMA-compressed serialization for maximum bandwidth reduction when desired.
- NEW: TNBehaviour-derived scripts will now try to find the TNObject in Start() if it was not found in OnEnable.
- NEW: Added TNManager.WriteCache and TNManager.ReadCache for when you want to store server-specific files on the client side, such as downloaded textures.
- NEW: All of TNet's resource loading and type retrieval functions can now be overwritten via TNet.UnityTools in case you want to expand it / limit it somehow. Example: support loading data from mod folders.
- NEW: Added UnityTools.LoadPrefab(path) that is able to load both prefabs as well as DataNode-exported data files.
- NEW: Added a variety of extensions to UnityTools, such as GameObject.AddChild(prefab) and Transform.GetHierarchy(target).
- NEW: UnityTools.GetMD5Hash() can be used to compute a checksum of data. Example usage: check the local hash against server's before downloading a large file.
- NEW: DataNode.GetHierarchy("Full/Path/To/Node") and DataNode.SetHierarchy("Full/Path/To/Node", value).
- NEW: Expanded DataNode serialization of data, making it capable of serializing everything from common types to meshes, materials, textures, references to objects, and much more.
- NEW: Added System.Type extension methods such as Type.GetMethodOrExtension that's capable of searching all loaded assemblies for a desired extension.
- NEW: All types can now be made serializable into DataNode without deriving from an interface by simply adding an extension to their class such as "void Serialize (this Type, DataNode)". Look inside TNUnitySerializers for examples. Same with deserialization by adding a Deserialize extension.
- NEW: Added object.Invoke("method", params) extension for convenience.
- NEW: Added Unity menu options that can be used to export/import the selected object as a DataNode binary. Look for them in the Assets/DataNode submenu.
- NEW: Added TNManager.onObjectCreated callback that will be called every time any object gets created.
- NEW: TNet is now able to respond to a simple HTTP browser GET request. Simply connect to your server via
http://127.0.0.1:5127/- NEW: Added DataNode.ToArray([type]) to quickly convert DataNode to byte[].
- NEW: Added TNManager.packetSourceID that identifies the last Forward and Create type packet's source player ID.
- NEW: Added an offline mode to TNet that still supports full functionality identical to that of playing alone on a local server.
- NEW: DataNode now supports exporting prefabs using asset bundles export for situations when regular binary export is not suitable.
- NEW: It's now possible to pass an empty string to TNManager.Instantiate causing TNet to pass back a dummy object on creation, thus letting the game object's contents be procedurally set.
- NEW: Serialization.Convert<T>(value) will use TNet's serialization to convert types.
- NEW: RCCs no longer require an ID and can be called by their function name.
- NEW: It's no longer necessary to call TNManager.AddRCCs. TNet will find all RCCs automatically.
- NEW: Expanded the chat example to support /get and /set commands that change server configuration.
- NEW: Added TNManager.GetChannelList().
- NEW: Added a new example showing a simple car with a frequent input and an infrequent rigidbody sync.
- NEW: TNManager.SetServerData, TNManager.SetChannelData and TNManager.SetPlayerData now all set only the path requested, not the entire thing.
- NEW: Calling TNManager.SetPlayerSave(filename) will now load previously saved player data and will auto-save the player's data into that file.
- NEW: GameServer will now periodically auto-save on its own, and no longer requires you to call SaveTo().
- NEW: Added DestroySelf(delay) functions to TNObject and TNBehaviour.
- NEW: TNManager will no longer send out expensive broadcasts such as OnNetworkConnect. Subscribe to an appropriate delegate instead, such as TNManager.onConnect. Examine TNEventReceiver for more details:
http://pastebin.com/qE3xqG9h- NEW: Added FieldOrProperty: a convenience class that's able to get/set values of both fields and properties with the same code, and with automatic type conversion via TNet's serialization. Example: transform.SetFieldOrPropertyValue("position", "(1, 2, 3)");
- NEW: Added an optional RuntimeCode extension package that makes executing run-time C# code trivial: RuntimeCode.Execute(code);
- NEW: Various new tutorials have been added.
- FIX: Player connecting to the TNServerInstance will now be its admin by default.
- FIX: Changing server options now immediately saves the server's configuration.
- FIX: TNet will no longer store RFCs for objects that have been deleted.
- FIX: TNet's threads will now go into extended sleep while the application is paused.
- FIX: DataNode with no name set should now be correctly text-serializable.
- FIX: Prefabs no longer need to be brought into the scene to export them as DataNode.
- DEL: Removed TNManager.SyncPlayerData(). Calling TNManager.SetPlayerData(...) will now sync automatically.
New video tutorial:
https://www.youtube.com/watch?v=7oBhEwAHU5w