Example #1
0
        public void OnEnable()
        {
            currentTarget = target as UMARandomizer;
            currentRace   = 0;
            List <string> Races = new List <string>();

            raceDatas = new List <RaceData>();

            raceDatas = UMAAssetIndexer.Instance.GetAllAssets <RaceData>();
            foreach (RaceData race in raceDatas)
            {
                Races.Add(race.name);
            }
            races = Races.ToArray();
        }
        public void OnEnable()
        {
            currentTarget = target as UMARandomizer;
            currentRace   = 0;
            List <string> Races = new List <string>();

            raceDatas = new List <RaceData>();

            string[] guids = AssetDatabase.FindAssets("t:racedata");

            foreach (string guid in guids)
            {
                string   path = AssetDatabase.GUIDToAssetPath(guid);
                RaceData rc   = AssetDatabase.LoadAssetAtPath <RaceData>(path);
                raceDatas.Add(rc);
                Races.Add(rc.raceName);
            }
            races = Races.ToArray();
        }