I started to work with new Unity 4.6 UI and already building custom menus. But I faced difficulties to add new gameobjects into canvas for new UI system. When I am using:
parent = this.gameObect;
child = new GameObject("child");
child.transform.parent = parent.transform;
it creates empty game object and attaches to canvas gameobject, which is parent. But it creates with regular component attached, not recttransform, which I need to be on this object. How I can create new child object for canvas with recttransform attached and ready to add buttons and other UI stuff?