public void ShowNodeDetails(SkillNode node)
        {
            SkillCollectionBase skillCollection = node.skillCollection;
            NodeStatus          status          = node.GetStatus();

            sidebarTitle.text = string.Format("{0}: Lv {1}", skillCollection.displayName, skillCollection.SkillIndex + 1);
            sidebarBody.text  = skillCollection.Skill.description;

            string requirements = skillCollection.Skill.GetRequirements();

            if (string.IsNullOrEmpty(requirements))
            {
                sidebarRequirements.gameObject.SetActive(false);
            }
            else
            {
                sidebarRequirements.text = "<b>Requirements:</b> \n" + skillCollection.Skill.GetRequirements();
                sidebarRequirements.gameObject.SetActive(true);
            }

            if (status == NodeStatus.Purchasable)
            {
                sidebarPurchasedMessage.gameObject.SetActive(false);
                sidebarPurchase.gameObject.SetActive(true);
                sidebarPurchase.onClick.RemoveAllListeners();
                sidebarPurchase.onClick.AddListener(() => {
                    skillCollection.Purchase();
                    UpdateNodes();
                    ShowNodeDetails(node);
                    UpdateSkillPoints();
                });
            }
            else if (status == NodeStatus.Unlocked)
            {
                sidebarPurchasedMessage.gameObject.SetActive(true);
                sidebarPurchase.gameObject.SetActive(false);
            }
            else
            {
                sidebarPurchasedMessage.gameObject.SetActive(false);
                sidebarPurchase.gameObject.SetActive(false);
            }

            sidebarContainer.gameObject.SetActive(true);
        }
        void CreateGrid(SkillCategoryBase category, Vector2 cellSize)
        {
            // Clean up pre-existing data
            foreach (Transform child in nodeContainer)
            {
                Destroy(child.gameObject);
            }

            foreach (Transform child in lineContainer)
            {
                Destroy(child.gameObject);
            }

            SkillCollectionGrid grid = category.GetComponentInParent <SkillTreeBase>().GetGrid(category);

            // Generate container with width and height based on cellSize
            nodeInnerContainer.sizeDelta = new Vector2(grid.Width * cellSize.x, grid.Height * cellSize.y);

            // Adjust the container position based on padding, resulting in perfectly aligned grid items
            RectTransform nodeRect    = nodePrefab.GetComponent <RectTransform>();
            Vector2       cellPadding = new Vector2((cellSize.x - nodeRect.sizeDelta.x) / 2f, (cellSize.y - nodeRect.sizeDelta.y) / 2f);

            nodeRef = new Dictionary <SkillCollectionBase, SkillNode>();

            // Place all grid items
            foreach (SkillCollectionGridItem gridItem in grid.GetAllCollections())
            {
                GameObject node = Instantiate(nodePrefab);
                node.transform.SetParent(nodeContainer);
                node.transform.localScale = Vector3.one;
                node.GetComponentInChildren <Text>().text            = gridItem.collection.displayName;
                node.GetComponent <RectTransform>().anchoredPosition = new Vector2((gridItem.x * cellSize.x) + cellPadding.x, (gridItem.y * cellSize.y * -1f) - cellPadding.y);

                SkillNode skillNode = node.GetComponent <SkillNode>();
                skillNode.menu            = this;
                skillNode.skillCollection = gridItem.collection;
                skillNodes.Add(skillNode);

                nodeRef.Add(gridItem.collection, skillNode);
            }
        }
		public void ShowNodeDetails (SkillNode node) {
			SkillCollectionBase skillCollection = node.skillCollection;
			NodeStatus status = node.GetStatus();

			sidebarTitle.text = string.Format("{0}: Lv {1}", skillCollection.displayName, skillCollection.SkillIndex + 1);
			sidebarBody.text = skillCollection.Skill.description;

			string requirements = skillCollection.Skill.GetRequirements();
			if (string.IsNullOrEmpty(requirements)) {
				sidebarRequirements.gameObject.SetActive(false);
			} else {
				sidebarRequirements.text = "<b>Requirements:</b> \n" + skillCollection.Skill.GetRequirements();
				sidebarRequirements.gameObject.SetActive(true);
			}

			if (status == NodeStatus.Purchasable) {
				sidebarPurchasedMessage.gameObject.SetActive(false);
				sidebarPurchase.gameObject.SetActive(true);
				sidebarPurchase.onClick.RemoveAllListeners();
				sidebarPurchase.onClick.AddListener(() => {
					skillCollection.Purchase();
					UpdateNodes();
					ShowNodeDetails(node);
					UpdateSkillPoints();
				});
			} else if (status == NodeStatus.Unlocked) {
				sidebarPurchasedMessage.gameObject.SetActive(true);
				sidebarPurchase.gameObject.SetActive(false);
			} else {
				sidebarPurchasedMessage.gameObject.SetActive(false);
				sidebarPurchase.gameObject.SetActive(false);
			}

			sidebarContainer.gameObject.SetActive(true);
		}