Esempio n. 1
0
        public virtual void AddView(IUIView view, UILayout layout)
        {
            if (view == null)
            {
                return;
            }

            Transform t = view.Transform;

            if (t == null)
            {
                return;
            }

            if (t.parent == transform)
            {
                layout?.Invoke(view.RectTransform);
                return;
            }

            view.Owner.layer = gameObject.layer;
            t.SetParent(transform, false);
            layout?.Invoke(view.RectTransform);
        }