示例#1
0
        private void Start()
        {
            if (Instance == null)
            {
                Instance = this;
            }

            contentWithTextsObjects = chatScrollRect.content;
        }
示例#2
0
        private void Start()
        {
            Debug.LogWarning(ChatUiObjectsContainer.Instance);
            ChatUiObjectsContainer chatUiObjectsContainer = ChatUiObjectsContainer.Instance;

            _contentWithTexts = chatUiObjectsContainer.contentWithTextsObjects;
            _bottomPanel      = chatUiObjectsContainer.bottomPanel;

            _childCount  = _contentWithTexts.childCount;
            _chatButtons = new Button[_childCount];
            _chatTexts   = new GameObject[_childCount];
            _chatButtons = _bottomPanel.GetComponentsInChildren <Button>();
            _scrollRect  = GameObject.Find("Scroll View General").GetComponent <ScrollRect>();

            for (var i = 0; i < _childCount; i++)
            {
                _chatTexts[i] = _contentWithTexts.GetChild(i).gameObject;
            }
        }