private void Setup(OnIconPickerResult callback) { Util.FindIfNotSet(this, ref iconLoader); this.callback = callback; closeButton.onClick.AddListener(OnCloseButtonClicked); iconRowTemplate.SetActive(false); PopulateCategories(); }
public static IconPickerDialog Launch(OnIconPickerResult callback) { GameObject obj = GameObject.Instantiate(Resources.Load <GameObject>(PREFAB_PATH)); IconPickerDialog dialog = obj.GetComponent <IconPickerDialog>(); dialog.Setup(callback); return(dialog); }