void AddSkill(string skillToAdd) { //Adds a skill or compounds it, if it already exists if (profile.GetSkill(skillToAdd) == null) { profile.AddSkill(skillToAdd); } }
void LoadCharModel() { //Deletes the current model, removes the associated skills, then adds the new model and the new skills List <string> skills = GetSkills(currentChar); for (int i = 0; i < skills.Count; i++) { if (profile.GetSkill(skills[i]) != null) { profile.RemoveSkill(skills[i]); } } Destroy(currentChar); currentChar = Instantiate(holder.charChoices[listPos], transform); skills = GetSkills(currentChar); for (int j = 0; j < skills.Count; j++) { if (profile.GetSkill(skills[j]) == null) { profile.AddSkill(skills[j]); } } profile.StoreModel(listPos); }