photon chat with PUN
Options
Hallo,
I'm sorry, but I can't find this topic elsewhere.
I tried to connect to photon chat cloud server with PUN
but I cant get connected nor get any error. the last log I receive was :
and then, nothing happened. and after I stop the program execution and run again, it always make unity editor crashed.
here is my code
thank you
Wahyu Ashari
I'm sorry, but I can't find this topic elsewhere.
I tried to connect to photon chat cloud server with PUN
but I cant get connected nor get any error. the last log I receive was :
Connecting to nameserver ns.exitgames.com:5058 UnityEngine.Debug:Log(Object) ExitGames.Client.Photon.Chat.ChatClient:ExitGames.Client.Photon.IPhotonPeerListener.DebugReturn(DebugLevel, String) (at Assets/Plugins/ChatApi/ChatClient.cs:544) ExitGames.Client.Photon.Chat.ChatPeer:Connect() (at Assets/Plugins/ChatApi/ChatPeer.cs:98) ExitGames.Client.Photon.Chat.ChatClient:Connect(ConnectionProtocol, String, String, String, AuthenticationValues) (at Assets/Plugins/ChatApi/ChatClient.cs:134) ExitGames.Client.Photon.Chat.ChatClient:Connect(String, String, String, AuthenticationValues) (at Assets/Plugins/ChatApi/ChatClient.cs:94) loginMenu:connectToChat() (at Assets/Scripts/loginMenu.cs:50) UnityEngine.EventSystems.EventSystem:Update()
and then, nothing happened. and after I stop the program execution and run again, it always make unity editor crashed.
here is my code
//is the using right? using ExitGames.Client.Photon.Chat; public class loginMenu:IChatClientListener{ public void connectToChat(){ ChatClient cc = new ChatClient (this); cc.Connect ("xxx", "1.0", "myusername", null); } //listener implementation public void OnDisconnected () { throw new System.NotImplementedException (); } public void OnConnected () { Debug.Log("connected") Application.LoadLevel ("mainMenu"); } public void OnChatStateChange (ChatState state) { throw new System.NotImplementedException (); } public void OnGetMessages (string channelName, string[] senders, object[] messages) { throw new System.NotImplementedException (); } public void OnPrivateMessage (string sender, object message, string channelName) { throw new System.NotImplementedException (); } public void OnSubscribed (string[] channels, bool[] results) { throw new System.NotImplementedException (); } public void OnUnsubscribed (string[] channels) { throw new System.NotImplementedException (); } public void OnStatusUpdate (string user, int status, bool gotMessage, object message) { throw new System.NotImplementedException (); } }
thank you
Wahyu Ashari
0
Comments
-
Hi,
Does chat demo from PUN package work for you?
Chat uses Chat API in fact, not PUN. Are you trying use both in same application?0 -
yes, I'm trying to use both in same application.
actually, the purpose is only for invite friends to room, not for chat.
As far as I know, photon real time doesn't has that feature so I have to use photon chat.
yes, I tried to open the demo and find out my mistake.
I have to put this.chatClient.Disconnect(); when application quit, otherwise the unity editor will always crash (haven't tried it on mobile, though).
thanks0