protected override IEnumerator OnLoadingView()
        {
            m_ButtonLayoutGroup = this.FindChildComponent <SubUIButtonLayoutGroup>("ButtonLayoutGroup");
            m_ButtonLayoutGroup.Display(false);
            m_ButtonLayoutGroup.onItemClick.AddListener(ButtonLayoutGroup_OnItemClick);

            yield break;
        }
        private static SubUIButtonLayoutGroup EditorCreateButtonLayoutGroup <T>(UnityEditor.MenuCommand menuCommand) where T : LayoutGroup
        {
            GameObject             gameObject = new GameObject("ButtonLayoutGroup", typeof(RectTransform), typeof(T), typeof(ContentSizeFitter));
            SubUIButtonLayoutGroup btnLayout  = gameObject.AddComponent <SubUIButtonLayoutGroup>();

            LayoutGroup layoutGroup = gameObject.GetComponent <T>();

            btnLayout.layoutGroup = layoutGroup;

            GameObject itemTemplate = DefaultControls.CreateButton(EditorGetStandardResources());

            itemTemplate.name = "ItemTemplate";
            Text itemTemplateText = itemTemplate.GetComponentInChildren <Text>();

            itemTemplateText.text     = "Template Button";
            itemTemplateText.fontSize = 20;
            //itemTemplate.SetActive(false);
            itemTemplate.transform.SetParent(gameObject.transform, false);
            btnLayout.itemTemplate = itemTemplate;

            ContentSizeFitter fitter = gameObject.GetComponent <ContentSizeFitter>();

            fitter.horizontalFit = ContentSizeFitter.FitMode.PreferredSize;
            fitter.verticalFit   = ContentSizeFitter.FitMode.PreferredSize;

            GameObject parent = menuCommand.context as GameObject;

            if (parent != null)
            {
                gameObject.name = UnityEditor.GameObjectUtility.GetUniqueNameForSibling(parent.transform, gameObject.name);
            }
            UnityEditor.Undo.RegisterCreatedObjectUndo(gameObject, "Create" + gameObject.name);
            if (parent != null)
            {
                UnityEditor.Undo.SetTransformParent(gameObject.transform, parent.transform, "Parent" + gameObject.name);
                UnityEditor.GameObjectUtility.SetParentAndAlign(gameObject, parent);
            }

            UnityEditor.Selection.activeGameObject = gameObject;
            return(btnLayout);
        }