🛠
Getting set up
Simulations using TNT as their transport need to be deterministic for now. As we enable join/rejoin during our closed beta, we will be able to handle non-deterministic simulations.⚠
TNT is a Unity Netcode for GameObjects transport that uses the Tashi Consensus Engine (TCE) to provide distributed communication with fair ordering of events.
The native shared library has been tested on the following operating system versions, where the target triple references a Rust compiler target:
- Windows 11 (x86_64-pc-windows-gnu), tested on 10.0.22621.
- macOS 13.2 Apple Silicon (aarch64-apple-darwin).
- Ubuntu 22.04 (x86_64-unknown-linux-gnu).
We tested the Unity plugin using the latest LTS, 2021.3.18f1, with the Mono scripting backend.
- Peers will be able to join and re-join an existing session.
- Peers will be able to leave a session.
- Improved robustness of the consensus algorithm - support for graph forks and general hardening.
- Switch to using UDP. This is in preparation for supporting various NAT traversal solutions.
- Enable the re-use of secret keys.
- Improved higher level error messages.
Each of these limitations will be resolved before the open beta phase.
The number of peers within the network must be decided upfront, and peers are unable to join or leave a running session. The work around for this is hard-coded in the transport for now:
- When used within Unity Editor it's set to 2 peers each listening on the loopback address on a random port.
- When used outside of the Unity Editor it expects to environment variables to be set:
TNT_PEERS
is how many peers to expect, including the local peer, e.g.2
.TNT_ADDRESS
is the IP address and port to bind to, e.g.192.168.0.1:0
.
There is currently no support for NAT traversal, which means the network must be configured manually in order for peers to be able to communicate with each other. We’ll gradually add various solutions for this, such as: NAT hole-punching, UPnP, and Unity Relay.
As mention, you can only use TNT as a network transport for in-game events in deterministic simulations for now.
- 1.Unzip the TNT package.
- 2.Open your Unity project. Open the
Package Manager
window which is under theWindow
menu. - 3.Select
+
, and choose to add package from disk. - 4.Navigate to the unzipped TNT package and select
package.json
. - 5.Click Open and you should see it in the
Packages - Other
section within the Package Manager.

- 1.Open the NetworkManager in the Inspector.
- 2.Click
Select transport...
- 3.Select Tashi Network Transport from the drop down.
The native library (
libtashi_platform.so
, etc.) includes support for logging which is disabled by default. This could be useful to get additional information - our higher level error messages are quite minimal for now. To enable it you should set the following environment variables:RUST_LOG_PATH
to a file location. No directories will be created and the file will be truncated if it already exists. Example:RUST_LOG_PATH=/tmp/tce.log
.
Last modified 3mo ago