Hello,
void OnServerInitialized()
{
//Wybierz nick
newNick = GUI.TextField(new Rect(10, 10, 200, 20), newNick, 25);
//Struktura nowego gracza
Gracze.Add ( new Gracz (networkView.owner.ToString(), newNick ) );
Gracze[0].Wypisz();
//Spawning
SpawnPlayer();
//Start timiera, powinien być dopiero jak są ze dwie osoby
Mechanika.leci = true;
}
Obviously I cant use GUI. outside of OnGUI function. What is the easiest way to make my code working? I want my program to ask a player for his nick OnServerInitialized() || OnConnectedToServer() and then use this nick to create new list object.