public void AchievementCreate(string parent, string title, int points, string description, int spriteIndex, string[] Dependencies = null) { GameObject Achievment = Instantiate(AchievementPrefab); Achievement newAchievement = new Achievement(name, description, points, spriteIndex, Achievment); achievements.Add(title, newAchievement); SetAchievementInfo(parent, Achievment, title, new Vector3(1, 1, 1)); if (Dependencies != null) { foreach (string AchievementTitle in Dependencies) { Achievement dependency = achievements[AchievementTitle]; dependency.child = title; newAchievement.AddDependencies(dependency); } } }