public void OnOk() { var walletName = nameOfWallet.text; var currency = (Currency)typeOfCurrency.value; var wallet = new Saving { name = walletName, currency = currency }; UserDataManager.AddSaving(wallet); gameObject.SetActive(false); }