public void OnEnable() { achievmentFile = (AchievmentsConfig)target; if (achievmentFile != null && achievmentFile.achievmentsList != null) { achCounter = achievmentFile.achievmentsList.Count; if (achievmentFile.language != null) { keyWords = new string[achievmentFile.language.dictionary.Count]; for (int i = 0; i < achievmentFile.language.dictionary.Count; i++) { keyWords[i] = achievmentFile.language.dictionary[i].keywordId; } } } }
public static void createConfig() { AchievmentsConfig config = ScriptableObject.CreateInstance <AchievmentsConfig>(); ProjectWindowUtil.CreateAsset(config, "achievments.asset"); }