public void SetChatMode(bool isPublicMode) { chatManager.SetChatMode(isPublicMode); if (isPublicMode) { privateChat.SavePrivateMessages(privateChatUI.GetText()); activeChatUI = publicChatUI; publicChatUI.SetMessageReceiver("Общий:"); } else { privateChatTweener.Show(); var userData = privateChat.MessageReceiver.Value; activeChatUI = privateChatUI; privateChatUI.Append(privateChat.GetMessages()); privateChatUI.SetMessageReceiver($"To {userData.id} {userData.nick}: "); } activeChatUI.Activate(); }