Ejemplo n.º 1
0
        private void AddHeader(SfbEntryType type)
        {
            var go = Instantiate(entryPrefabs.First(a => a.type == type).gameObject);
            var wrapper = SfbEntryWrapper.CreateEmpty((go.transform as RectTransform).rect.height);
            wrapper.transform.SetParent(content, false);
            wrapper.parent = this;
            wrapper.interactable = false;
            wrappers.Add(wrapper);

            go.name = type.ToString().Replace("Header", "") + ":";
            go.transform.SetParent(wrapper.transform, false);
            go.GetComponentInChildren<Text>().text = type.ToString().Replace("Header", "") + ":";

            var entry = go.GetComponent<SfbEntry>();
            entry.wrapper = wrapper;
            wrapper.BrowserEntry = entry;
        }
Ejemplo n.º 2
0
        private void AddHeader(SfbEntryType type)
        {
            var go      = Instantiate(entryPrefabs.First(a => a.type == type).gameObject);
            var wrapper = SfbEntryWrapper.CreateEmpty((go.transform as RectTransform).rect.height);

            wrapper.transform.SetParent(content, false);
            wrapper.parent       = this;
            wrapper.interactable = false;
            wrappers.Add(wrapper);

            go.name = type.ToString().Replace("Header", "") + ":";
            go.transform.SetParent(wrapper.transform, false);
            go.GetComponentInChildren <Text>().text = type.ToString().Replace("Header", "") + ":";

            var entry = go.GetComponent <SfbEntry>();

            entry.wrapper        = wrapper;
            wrapper.BrowserEntry = entry;
        }