private void AddChild(IRenderObject child) { if (children == null) { children = new PList <IRenderObject>(); children.Init(); } children.AddTail(child); if (this.gameObject != null && child.gameObject != null) { child.gameObject.transform.parent = this.gameObject.transform; } }