void instantiateSubactionButton(SubactionDataDefault subData) { GameObject go = NGUITools.AddChild(gameObject, subactionButtonPrefab); SubactionCreateButton button = go.GetComponent <SubactionCreateButton>(); button.SetAction(subData); children.Add(go); }
// Start is called before the first frame update void Awake() { button = GetComponent <SubactionCreateButton>(); }