Example #1
0
        /// <summary>
        /// Clean up all hero objects in the project.
        /// </summary>
        public static void RefreshHeroObjects()
        {
            // get all hero objects in "Assets/Resources/" directories
            HeroObject[] heroObjects = Resources.LoadAll <HeroObject>("");

            // refresh all hero objects with the new data
            foreach (HeroObject o in heroObjects)
            {
                HeroKitCommon.BuildAllPropertyFields(o);
                HeroKitCommon.BuildInspectorFields(o);
                BuildActionFields(o);
                Debug.Log("Data refreshed for: " + o.name);
            }
        }