public void RpcReceiveChatMessage(ChatMessage message) { ChatUI chatUI = GameObject.FindObjectOfType <ChatUI>(); if (chatUI != null) { chatUI.ReceiveNewMessage(message); } }