PM Chat, Group Chat??

edited February 2015 in Photon Chat
hi im found chat system using photon in Viking Showcase,
its amazing, coz so simple,
i have problem to remove an string as 'master' like :
chat message
how to exclude this word?

the code said :
void SendChat(string text, PhotonMessageInfo info)
		AddMessage("[" + info.sender + "] " + text);
	} is the point.

and other question,
i found an code about code :
void SendChatTarget(PhotonPlayer target)
		if (chatInput != "")
			chatInput = "[PM] " + chatInput;
			photonView.RPC("SendChat", target, chatInput);
			chatInput = "";

how to use this as PM chat, and how to implement to GroupChat?


  • Actually, the chat "system" in the Viking Demo is just a in-room chat based off RPCs.
    The chat in the Viking Demo is not "Photon Chat", which this forum is about.
    Just to let you know :)

    The sender is a PhotonPlayer instance. If you use it like this, the program will call sender.ToString(). You could simply use
  • thanks Tobias, love about ""

    actually, in MOBA. i just need simple chat. i think chat system in the "Viking Demo" is good to me.
    can you or anyone show to send chat as PM with above code?
  • There is not much to show. You send a PM by calling SendChatTarget(player). And player is some player you want to send the PM to.