UITestChannel CreateTestChannel(string channeId, string channelName)
        {
            TestChannelMeta meta = new TestChannelMeta()
            {
                channelId   = channeId,
                channelName = channelName
            };

            UITestChannel testChannel = Instantiate(dafaultChannel);

            testChannel.gameObject.SetActive(true);
            testChannel.transform.SetParent(channelScrollRect.content);
            testChannel.transform.localScale = Vector3.one;
            testChannel.transform.SetAsLastSibling();
            testChannel.SetRemoveButtonActive(true);
            testChannel.PopulateData(meta);

            return(testChannel);
        }
Esempio n. 2
0
        public void PopulateData(TestChannelMeta meta)
        {
            this.meta = meta;

            channelNameInput.text = meta.channelName;
        }