public void Start()
{
Application.runInBackground = true; // this must run in background or it will drop connection if not focussed.
if (string.IsNullOrEmpty(this.UserName))
{
this.UserName = "Anonymous" + Environment.TickCount%99; //made-up username
}
chatClient = new ChatClient(this);
chatClient.Connect(ChatAppId, "Prototype", new ExitGames.Client.Photon.Chat.AuthenticationValues(this.UserName));
if (this.AlignBottom)
{
this.GuiRect.y = Screen.height - this.GuiRect.height;
}
if (this.FullScreen)
{
this.GuiRect.x = 0;
this.GuiRect.y = 0;
this.GuiRect.width = Screen.width;
this.GuiRect.height = Screen.height;
}
}