コード例 #1
0
        public static void RemoveUIItems(MenuCommand menuCommand)
        {
            GameObject parent = menuCommand.context as GameObject;

            UIItemUtility.RemoveUIItems(parent);

            EditorSceneManager.MarkSceneDirty(parent.gameObject.scene);
        }
コード例 #2
0
        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);
                });
            });
        }
コード例 #3
0
        static void AddUIItemWrapper(MenuCommand menuCommand)
        {
            GameObject parent = menuCommand.context as GameObject;

            UIItemUtility.AddUIItemWrapper(parent);
        }