First off, I recently purchased the TNET framework and, for the most part, this is a fantastic piece of work!
One thing I noticed is on the TNManager.playerName. I want to have the playerName updated AFTER a connect to a server but BEFORE joining a channel. This is so other players in the channel will see the player's updated name when the player joins a channel for chat.
In the TNET chat example, I added a line in the ExampleMenu.cs to change playerName BEFORE joining channel:
if (GUI.Button(rect, sceneName, button))
{
// When a button is clicked, join the specified channel.
// Whoever creates the channel also sets the scene that will be loaded by everyone who joins.
// In this case, we are specifying the name of the scene we've just clicked on.
TNManager.playerName = "Fred";
TNManager.JoinChannel(i + 1, sceneName);
}
This gives me an error and prevents load of chat scene. Error is:
"ArgumentException: Getting control 0's position in a group with only 0 controls when doing Repaint
Aborting"
As it stands right now, I have to add the playername change AFTER the channel join, but other players in chat will see it as a "Guest" join message then rename to "Fred".
Is there any way to do playername changes before a channel join?
Thanks!