Example #1
0
        public UIBase AddChildObject(string name, Action <UIObjectBuilder> configureChild)
        {
            var child = new UIObjectBuilder(name, this);

            configureChild?.Invoke(child);
            return(this);
        }
Example #2
0
        public UIBase AddChildObject <T>(string name, Action <UIObjectBuilder <T> > configureChild) where T : Component
        {
            var child = new UIObjectBuilder <T>(name, this);

            configureChild?.Invoke(child);
            return(this);
        }
        public UIObjectBuilder AddChildObject <TComponent>(string name, Action <UIObjectBuilder <TComponent> > configureChild) where TComponent : Component
        {
            var child = new UIObjectBuilder <TComponent>(name, GameObject);

            configureChild?.Invoke(child);
            return(this);
        }