angelsinhbfs
started a topic on Wed, 12 August 2015 at 1:54 AM
I am currently trying to get photon cloud and chat both working on the same game. I can get photon cloud working just fine, but I am having trouble with the chat implementation. it currently hangs at connecting to nameserver.
PlayFabClientAPI.GetPhotonAuthenticationToken(new GetPhotonAuthenticationTokenRequest
{
PhotonApplicationId = PlayFabSettings.PhotonChatAppID
}, OnPhotonChatSuccess, OnPlayFabError);
Debug.Log(callStatus);
private void OnPhotonChatSuccess(GetPhotonAuthenticationTokenResult result)
{
var authVals = new ExitGames.Client.Photon.Chat.AuthenticationValues()
{
AuthType = ExitGames.Client.Photon.Chat.CustomAuthenticationType.Custom,
Secret = null,
AuthParameters = "username=" + System.Uri.EscapeDataString(PlayFabSettings.Username) + "&token=" + System.Uri.EscapeDataString(result.PhotonCustomAuthenticationToken),
};
var chatC = PlayFabSettings.chatClient.GetComponent<ChatCore>();
chatC.AuthVal = authVals;
chatC.init();
chatWindow.SetActive(true);
}
public void init()
{
client = new ChatClient(this);
client.Connect(PlayFabSettings.PhotonChatAppID, "1.0", PlayFabSettings.Username, AuthVal);
Invoke("Start", 3.0f);
}