Пример #1
0
        public HierarchyLogicElement(HierarchyElementCreationTemplate <BufferedRectTransform> hierarchyTabTemplate, HierarchyBaseElement hierarchyBaseElement)
        {
            this.hierarchyTabTemplate = hierarchyTabTemplate;

            bufferedHierarchyTabElements = new BufferedArray <BufferedRectTransform>(InstantiateBufferedHierarchyTabElement, BufferHierarchyTabElement);

            this.hierarchyBaseElement = hierarchyBaseElement;
        }
Пример #2
0
        private void Awake()
        {
            hierarchyBaseElement = GetComponentInParent <HierarchyBaseElement>();

            parentCanvas = GetComponentInParent <Canvas>();

            rectTransform = GetComponent <RectTransform>();

            rect = RectTransformUtility.PixelAdjustRect(rectTransform, parentCanvas);

            isInitialised = true;
        }
Пример #3
0
        protected override void Awake()
        {
            hierarchyBaseElement = GetComponentInParent <HierarchyBaseElement>();

            rectTransform = GetComponent <RectTransform>();
            gameObject    = rectTransform.gameObject;
            animator      = GetComponent <Animator>();
            button        = GetComponent <Button>();

            _labelRectTransform = (RectTransform)rectTransform.GetChild(0);

            arrowElement = GetComponentInChildren <ArrowElement>();
            elementTitle = _labelRectTransform.GetComponentInChildren <TMPro.TextMeshProUGUI>();
        }
        protected override void Awake()
        {
            hierarchyBaseElement = GetComponentInParent <HierarchyBaseElement>();

            rectTransform = GetComponent <RectTransform>();
            animator      = GetComponent <Animator>();
            button        = GetComponentInChildren <Button>();

            _labelRectTransform = (RectTransform)rectTransform.GetChild(0);

            arrowElement           = GetComponentInChildren <ArrowElement>(true);
            arrowElementGameObject = arrowElement.gameObject;
            tabElementGameObject   = rectTransform.Find("Label").Find("HierarchyTabElement").gameObject;

            elementTitle = _labelRectTransform.GetComponentInChildren <TMPro.TextMeshProUGUI>();

            enableArrowElement = false;

            SetElementAnchors();
            SetElementWidth();
        }