How do i Send Strings to the server?
Options
I Want to send a MapName to the server and have it tell the game what map to load for that room. Im useing the BootCamp Demo. How do i do it?
this is the code i Changed in the usePhoton script.
void StartGame()
{
GameInstance = new Game(DebugReturn, this);
GameInstance.Connect();
this.LobbyHandlerInstance = new LobbyHandler(this.GameInstance.ipPort, Game.AppName, Game.LobbyName,Game.MapName, this);
this.LobbyHandlerInstance.StartService();
MapName = Game.MapName.ToString();
if (namePlayer == string.Empty)
{
namePlayer = "Player " + GameInstance.RoomNumber.ToString();
}
GameInstance.LocalPlayer.name = namePlayer;
}
void JoinToLobby(string key)
{
this.GameInstance.JoinToLobby((string)key);
if (MapName == "Bootcamp") ; {
Map = Bootcamp;
Instantiate(Map);
}
}
this is the code i Changed in the usePhoton script.
void StartGame()
{
GameInstance = new Game(DebugReturn, this);
GameInstance.Connect();
this.LobbyHandlerInstance = new LobbyHandler(this.GameInstance.ipPort, Game.AppName, Game.LobbyName,Game.MapName, this);
this.LobbyHandlerInstance.StartService();
MapName = Game.MapName.ToString();
if (namePlayer == string.Empty)
{
namePlayer = "Player " + GameInstance.RoomNumber.ToString();
}
GameInstance.LocalPlayer.name = namePlayer;
}
void JoinToLobby(string key)
{
this.GameInstance.JoinToLobby((string)key);
if (MapName == "Bootcamp") ; {
Map = Bootcamp;
Instantiate(Map);
}
}
0
Comments
-
duplicate post: viewtopic.php?f=5&t=4800