public void CreatePrivateChat() { AppManager.Instance.loading.SetActive(true); List <User> mUserList = new List <User>(); mUserList.Add(selectedUser); GroupChannel.CreateChannel(mUserList, false, (channel, e) => { if (e != null) { Debug.Log(e.Code + ": " + e.Message); AppManager.Instance.loading.SetActive(false); return; } currentChannel = (GroupChannel)channel; currentChannel.SendUserMessage("Hello I am using BeSober.", (message, e1) => { if (e1 != null) { Debug.Log(e.Code + ": " + e1.Message); return; } GetListOfFriends(); LoadPreviousChatHistory(); AppManager.Instance.loading.SetActive(false); }); }); }