Exemplo n.º 1
0
        public static void GetComponentsInChildren <T>(GameObject go, T[] components, ref int count) where T : Component
        {
            T component = go.GetComponent <T>();

            if (component != null)
            {
                components[count] = component;
                count++;
            }
            for (int i = 0; i < go.transform.childCount; i++)
            {
                CUIUtility.GetComponentsInChildren <T>(go.transform.GetChild(i).gameObject, components, ref count);
            }
        }
Exemplo n.º 2
0
 private void InitializeRenderers()
 {
     this.m_renderers     = new Renderer[100];
     this.m_rendererCount = 0;
     CUIUtility.GetComponentsInChildren <Renderer>(base.gameObject, this.m_renderers, ref this.m_rendererCount);
 }