Ejemplo n.º 1
0
        public override void Refresh()
        {
            base.Refresh();
            components.Clear();

            GameObject go = Value as GameObject;

            if (go)
            {
                go.GetComponents(components);

                for (int i = components.Count - 1; i >= 0; i--)
                {
                    if (!components[i])
                    {
                        components.RemoveAt(i);
                    }
                }

                if (Inspector.ComponentFilter != null)
                {
                    Inspector.ComponentFilter(go, components);
                }
            }
        }
Ejemplo n.º 2
0
        public override void Refresh()
        {
            // Refresh components
            components.Clear();
            GameObject go = Value as GameObject;

            if (go)
            {
                go.GetComponents(components);

                for (int i = components.Count - 1; i >= 0; i--)
                {
                    if (!components[i])
                    {
                        components.RemoveAt(i);
                    }
                }

                if (Inspector.ComponentFilter != null)
                {
                    Inspector.ComponentFilter(go, components);
                }
            }

            // Regenerate components' drawers, if necessary
            base.Refresh();
        }
Ejemplo n.º 3
0
        public override void Refresh()
        {
            base.Refresh();

            components.Clear();
            if (!Value.IsNull())
            {
                GameObject go = (GameObject)Value;
                go.GetComponents(components);

                for (int i = components.Count - 1; i >= 0; i--)
                {
                    if (components[i].IsNull())
                    {
                        components.RemoveAt(i);
                    }
                }

                if (Inspector.ComponentFilter != null)
                {
                    Inspector.ComponentFilter(go, components);
                }
            }
        }