public GameObject CreateGameObject(string name, GameObject parent) { GameObject go = SpriteConstructor.GOFactory(name, parent); #if !NGUI // Unity UI objects need Rect Transforms, // add the component after creating the base object RectTransform rectTrans = go.AddComponent <RectTransform>(); rectTrans.sizeDelta = Vector2.zero; #endif return(go); }
public GameObject CreateGameObject(string name, GameObject parent) { return(SpriteConstructor.GOFactory(name, parent)); }