Esempio n. 1
0
        /// <summary>
        /// 刷新右侧组件信息界面
        /// </summary>
        public void SetRightTreeView(GameObject gameObject, bool firstOpen)
        {
            Dictionary <Type, Component> components =
                RefHelper.GetPrivateProperty <Dictionary <Type, Component> >(gameObject, "ComponentDict");

            var node = AddGameObjectNode(treeViewCom.Nodes, gameObject);

            if (firstOpen)
            {
                node.Expand();
            }

            foreach (Component component in components.Values)
            {
                node = AddCompontNode(treeViewCom.Nodes, component);
                if (firstOpen && node != null)
                {
                    node.Expand();
                }
            }
        }