Hierarchy Root 에 인스턴스(prefab) 이 생성된다.
따라서 기존의 Object Child 로 생성하려면 아래와 같이 하면 됩니다.
Source code for C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected GameObject slot_prefab = null; | |
for(int i = 0; i < max_slot_count; ++i) | |
{ | |
GameObject go = GameObject.Instantiate(slot_prefab) as GameObject; | |
go.transform.parent = transform; | |
go.name = string.Format("{0:D2}", i); | |
_table_slot.Add(go.GetComponent<SdkListItem>()); | |
} |