internal void CreateBindsUI(Binds[] binds, InputManager inManger) //Creates Categories
        {
            inputManager = inManger;

            categories = new GameObject[binds.Length];
            RectTransform controlsScrollRt = controlsScroll.GetComponent <RectTransform>();

            conflictPopup.transform.GetChild(0).Find("Cancel").GetComponent <Button>().onClick.AddListener(Cancel);
            conflictPopup.transform.GetChild(0).Find("Switch").GetComponent <Button>().onClick.AddListener(Switch);
            conflictPopupText = conflictPopup.transform.GetChild(0).Find("Text").GetComponent <Text>();

            popupText = bindPopup.transform.GetChild(0).Find("Text").GetComponent <Text>();

            for (int i = 0; i < binds.Length; i++)
            {
                GameObject catH = new GameObject(binds[i].CategoryName + " Category");
                if (i != 0)
                {
                    catH.SetActive(false);
                }

                categories[i] = catH;

                RectTransform catHRt = catH.AddComponent <RectTransform>();
                catHRt.SetParent(controlsScroll.content, false);

                catHRt.anchorMin = Vector2.zero;
                catHRt.anchorMax = Vector2.one;

                catHRt.offsetMin = Vector2.zero;
                catHRt.offsetMax = Vector2.zero;

                GameObject catO = Instantiate(categoryTemplate);

                RectTransform catRt = catO.GetComponent <RectTransform>();
                catRt.name = binds[i].CategoryName;
                catRt.SetParent(controlsScrollRt, false);
                catRt.anchoredPosition = new Vector2(i * (catRt.sizeDelta.x + 10), 0);

                Button catB = catO.GetComponent <Button>();

                float buttonHeight = bindTemplate.GetComponent <RectTransform>().sizeDelta.y;
                float height       = MenuTools.CalcScrollHeight(binds[i].bindsCount, buttonHeight, 10);

                if (i == 0)
                {
                    MenuTools.SetScrollHeight(controlsScroll, height);
                }

                SetCategoryButton(catB, i, height);

                Text catT = catRt.GetComponentInChildren <Text>();
                catT.text = binds[i].CategoryName;

                CreateBind(i, binds[i].AllBinds);
            }
        }
        void OpenCategory(int index, float height) //Opens A New Bind Category And Sets The Control Scroll Height
        {
            MenuTools.SetScrollHeight(controlsScroll, height);

            for (int i = 0; i < categories.Length; i++)
            {
                if (i == index)
                {
                    categories[i].SetActive(true);
                }
                else
                {
                    categories[i].SetActive(false);
                }
            }
        }
        public void CreateAudioUI(AudioManager newAudioManager) //Create UI For The Audio Manager
        {
            audioManager = newAudioManager;

            for (int i = 0; i < AudioManager.AudioChannels.Length; i++)
            {
                GameObject channelO = Instantiate <GameObject>(audioChannelTemplate);

                RectTransform channelRt = channelO.GetComponent <RectTransform>();
                channelRt.SetParent(audioChannelScroll.content, false);
                channelRt.anchoredPosition = new Vector2(0, -i * (channelRt.sizeDelta.y + 10) - 10);

                Slider sl = channelRt.Find("Slider").GetComponent <Slider>();
                AudioManager.AudioChannels[i].SetUI(sl);

                Text text = channelRt.Find("Text").GetComponent <Text>();
                text.text = AudioManager.AudioChannels[i].Name;
            }

            float channelHeight = audioChannelTemplate.GetComponent <RectTransform>().sizeDelta.y;
            float height        = MenuTools.CalcScrollHeight(AudioManager.AudioChannels.Length, channelHeight, 10);

            MenuTools.SetScrollHeight(audioChannelScroll, height);
        }
        void CreateLevelUI()
        {
            SetLevelPreview();

            for (int i = 0; i < levels.LevelsCount; i++)
            {
                GameObject levelO = Instantiate(levelTemplate);

                RectTransform levelRt = levelO.GetComponent <RectTransform>();
                levelRt.SetParent(levelsScroll.content, false);
                levelRt.anchoredPosition = new Vector2(0, -i * (levelRt.sizeDelta.y + 10) - 10);

                Button levelB = levelO.GetComponent <Button>();
                SetLevelButton(levelB, i);

                Text levelT = levelRt.GetComponentInChildren <Text>();
                levelT.text = levels[i].Name;
            }

            float levelHeight = levelTemplate.GetComponent <RectTransform>().sizeDelta.y;
            float height      = MenuTools.CalcScrollHeight(levels.LevelsCount, levelHeight, 10);

            MenuTools.SetScrollHeight(levelsScroll, height);
        }