Esempio n. 1
0
        /// <summary>
        /// 初始化引用
        /// </summary>
        void InitRerences()
        {
            titleText        = transform.FindChild("Root/TitleBar/Text").GetComponent <Text>();
            pathInputField   = transform.FindChild("Root/Padding/TopView/PathInputField").GetComponent <InputField>();
            searchInputField = transform.FindChild("Root/Padding/TopView/SearchInputField").GetComponent <InputField>();

            var midViewRoot = transform.FindChild("Root/Padding/MidView/Padding").transform;

            quickLinksContainer = midViewRoot.FindChild("QuickLinks/Viewport/QuickLinksContainer").GetComponent <RectTransform>();
            filesScrollRect     = midViewRoot.FindChild("Files").GetComponent <ScrollRect>();
            listView            = midViewRoot.FindChild("Files").GetComponent <RecycledListView>();
            filesContainer      = midViewRoot.FindChild("Files/Viewport/FilesContainer").GetComponent <RectTransform>();

            var bottomViewRoot = transform.FindChild("Root/Padding/BottonView/Padding").transform;

            filenameInputField       = bottomViewRoot.FindChild("TopRow/FilenameInputField").GetComponent <InputField>();
            filenameImage            = bottomViewRoot.FindChild("TopRow/FilenameInputField").GetComponent <Image>();
            filtersDropdown          = bottomViewRoot.FindChild("TopRow/FilterDropdown").GetComponent <Dropdown>();
            filtersDropdownContainer = bottomViewRoot.FindChild("TopRow/FilterDropdown/Template").GetComponent <RectTransform>();
            filterItemTemplate       = bottomViewRoot.FindChild("TopRow/FilterDropdown/Template/Viewport/Content/Item/Item Label").GetComponent <Text>();
            showHiddenFilesToggle    = bottomViewRoot.FindChild("BottomRow/ShowHiddenFilesToggle").GetComponent <Toggle>();
            submitButtonText         = bottomViewRoot.FindChild("BottomRow/SubmitButton/Text").GetComponent <Text>();
        }