public static void RemoveUIItems(MenuCommand menuCommand) { GameObject parent = menuCommand.context as GameObject; UIItemUtility.RemoveUIItems(parent); EditorSceneManager.MarkSceneDirty(parent.gameObject.scene); }
static void AddUIItems(MenuCommand menuCommand) { GameObject parent = menuCommand.context as GameObject; parent.transform.ForEach((child) => { child.gameObject.ForEachComponent((component) => UIItemUtility.IsUIItemWrapperComponent(component), (component) => { Type wrapperType = component.GetType(); MethodInfo methodInfo = wrapperType.GetMethod("ReshowItem"); methodInfo.Invoke(component, null); }); }); }
static void AddUIItemWrapper(MenuCommand menuCommand) { GameObject parent = menuCommand.context as GameObject; UIItemUtility.AddUIItemWrapper(parent); }