public void Create_Animal() { //Si if (inputName.text != "" && inputDay.text != "" && inputMonth.text != "" && inputYear.text != "" && inputId.text != "" && dropRace.value != 0 && int.Parse(inputDay.text) <= 31 && int.Parse(inputMonth.text) <= 12 && int.Parse(inputYear.text) <= DateTime.Now.Year) { int count; string name; string sex; int day; int month; int year; string race; string id; string loof; string father; string mother; name = inputName.text; if (tglMale.isOn) { sex = "M"; } else { sex = "F"; } day = int.Parse(inputDay.text); month = int.Parse(inputMonth.text); year = int.Parse(inputYear.text); race = loadClass.catLstRaces[dropRace.value].id; id = inputId.text; loof = inputLoof.text; father = inputFather.text; mother = inputMother.text; count = loadClass.catLstAnimals.Count; loadClass.CreateNewAnimal(count - 1, "Cat", name, sex, day, month, year, race, id, loof, father, mother); addNewPanel.SetActive(false); Show(); } else { if (inputName.text == "") { mustName.color = Color.red; } else { mustName.color = Color.black; } if (inputDay.text == "" || inputMonth.text == "" || inputYear.text == "" || int.Parse(inputDay.text) > 31 || int.Parse(inputMonth.text) > 12 || int.Parse(inputYear.text) > DateTime.Now.Year) { mustDate.color = Color.red; } else { mustDate.color = Color.black; } if (inputId.text == "") { mustId.color = Color.red; } else { mustId.color = Color.black; } if (dropRace.value == 0) { mustDate.color = Color.red; } else { mustDate.color = Color.black; } } }