using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class LetterText : MonoBehaviour { public Text letterText; private string language; // Start is called before the first frame update void Start() { language = PlayerPrefs.GetString("language"); if (PlayerPrefs.HasKey("language")) { language = PlayerPrefs.GetString("language"); if (language == "English") { letterText.text = "Bring back my family heirloom that was stolen by bandits hiding in the nearby cave and I will reward you generously."; } else if (language == "Polish") { letterText.text = "Przynies mi spadek po mojej rodzinie, ktory zostal skradziony przez bandytow chowajacych sie w pobliskiej jaskini, a zostaniesz hojnie nagrodzony."; } } else { letterText.text = "Bring back my family heirloom that was stolen by bandits hiding in the nearby cave and I will reward you generously."; } } }