private void SetOptions() { UnityEngine.Events.UnityAction[] actions = GetButtonActionFromDict((Dialogue_Prompt_Logic.FilterKeys(currentDialoguePrompt, shopkeeperRef)).ToArray()); for (int i = 0; i < actions.Length; ++i) { SetBtnActions(i + 1, actions [i]); } List <string> buttonKeys = Dialogue_Prompt_Logic.FilterKeys(currentDialoguePrompt, shopkeeperRef); string[] choicesString = new string[6]; for (int i = 0; i < buttonKeys.Count; ++i) { string buttonTextKey = Dialogue_Option.GetOptionByName(buttonKeys[i]).buttonTextKey; List <string> parameters = new List <string>(); switch (buttonKeys[i]) { case "dialogue_option_shopProduct": { if (i < shopkeeperRef.home.inventory.items.Count && shopkeeperRef.home.inventory.items[i] != null) { string parameter = Localization.LocalizeText(shopkeeperRef.home.inventory.items[i].id); parameters.Add(parameter); choicesString[i] = Localization.LocalizeText(buttonTextKey, parameters); } else { choicesString[i] = "DISABLE ME!"; } break; } //case "dialogue_option_confirmPurchase": { //parameters.Add (); //break; } default: { choicesString[i] = Localization.LocalizeText(buttonTextKey); break; } } } choicesText.Clear(); choicesText = choicesString.ToList(); SetChoices(choicesString); }