//=============== // 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(); } }
public void SortByAlias() { Component[] components = this.GetComponents <Component>().ToList().OrderBy(x => x.GetAlias()).ToArray(); DataBehaviour.Sort(components); }