void Start() { if (StaticLanguage.getLanguage().Equals("portuguese")) { genero.text = "Género"; ethnicity.text = "Etnia"; } else { genero.text = "Gender"; ethnicity.text = "Ethnicity"; } if (!System.IO.File.Exists(Application.persistentDataPath + "/avatar")) { avatar = new AvatarSelection(); } else { avatar = FileManager.ReadFromBinaryFile <AvatarSelection> (Application.persistentDataPath + "/avatar"); } head.sprite = avatar.selectCurrentHead(); torso.sprite = avatar.selectCurrentTorso(); legs.sprite = avatar.selectCurrentLegs(); if (avatar.getGender().Equals("Male")) { male.interactable = false; } else { female.interactable = false; } }
void Start() { if (!System.IO.File.Exists(Application.persistentDataPath + "/avatar")) { avatar = new AvatarSelection(); } else { avatar = FileManager.ReadFromBinaryFile <AvatarSelection> (Application.persistentDataPath + "/avatar"); } head.sprite = avatar.selectCurrentHead(); torso.sprite = avatar.selectCurrentTorso(); legs.sprite = avatar.selectCurrentLegs(); }