Esempio n. 1
0
        //===============
        // Shared
        //===============
        public static void SortSmartTarget(GameObject target)
        {
            Component[] components = target.GetComponents <Component>().ToList().OrderBy(x => x.GetAlias()).ToArray();
            DataBehaviour.Sort(components);
            var controller = components.Find(x => x.GetType().Name.Contains("State"));

            if (!controller.IsNull())
            {
                controller.MoveToTop();
            }
        }
Esempio n. 2
0
 public void SortByAlias()
 {
     Component[] components = this.GetComponents <Component>().ToList().OrderBy(x => x.GetAlias()).ToArray();
     DataBehaviour.Sort(components);
 }