public void AddFriendClicked() { UnityAction <int> afterSelect = (int response) => { Action <string> afterInput = (string input) => { PF_PlayerData.AddFriend(input, (PF_PlayerData.AddFriendMethod)response, (bool result) => { if (result) { Dictionary <string, object> eventData = new Dictionary <string, object>(); // no real data to be sent with this event, just sending an empty dict for now... PF_Bridge.LogCustomEvent(PF_Bridge.CustomEventTypes.Client_FriendAdded, eventData); PF_PlayerData.GetFriendsList(() => { UpdateFriendList(); }); } }); }; DialogCanvasController.RequestTextInputPrompt(GlobalStrings.ADD_FRIEND_PROMPT, string.Format(GlobalStrings.ADD_FRIEND_MSG, (PF_PlayerData.AddFriendMethod)response), afterInput); }; DialogCanvasController.RequestSelectorPrompt(GlobalStrings.FRIEND_SELECTOR_PROMPT, Enum.GetNames(typeof(PF_PlayerData.AddFriendMethod)).ToList(), afterSelect); }