When working with TNet, there is no need to have different client and server projects. The way TNet communicates is by matching TNObject IDs, then locating a MonoBehaviour with the correct function name (or ID if you used that). When you do tno.Send(...) this message gets sent to the server, where it will be relayed to the recipients.
Start by creating a single scene. In this scene, create a MonoBehaviour that has OnNetworkConnect, OnNetworkDisconnect, OnNetworkJoinChannel, OnNetworkLeaveChannel, OnNetworkPlayerLeave functions. Debug.Log the entries just so you see when they get called.
Now create the means of communication -- attach TNObject script to this game object. With TNObject present, your script can now derive from TNBehaviour instead of MonoBehaviour, thus letting you send messages back and forth.
Assuming you have something like this:
void OnGUI ()
{
if (GUILayout.Button("Host")) TNServerInstance.Start(5127);
if (GUILayout.Button("Connect")) TNManager.Connect("127.0.0.1");
}
...you now have the means of starting a server on one instance of your program, and connecting to it on another.
Now that you have a connection, you can communicate -- but you should first join a channel. Inside OnNetworkConnect() function:
void OnNetworkConnect (bool success, string msg)
{
TNManager.JoinChannel(123, null); // <-- 'null' can be another scene to load if you don't want to keep the same one
}
Now both clients will be in the same channel as soon as the connection is established. This lets you send messages back and forth. Expand the OnGUI function like so:
string mText = "";
void OnGUI ()
{
if (GUILayout.Button("Host")) TNServerInstance.Start(5127);
if (GUILayout.Button("Connect")) TNManager.Connect("127.0.0.1");
if (GUILayout.Button("SetText 1")) tno.Send("OnText", Target.All, 1);
if (GUILayout.Button("SetText 2")) tno.Send("OnText", Target.All, 2);
GUILayout.Label(mText);
}
[RFC] protected void OnText (int val) { mText = "Last value: " + val; }
And there you have it. One client connects to another, then you can press the SetText 1 and 2 buttons, seeing values change on both instances of your game at once.