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); }
private void OnEditIconButtonClicked() { IconPickerDialog.Launch(pickedIcon => { if (pickedIcon == null) { return; } card.SetImagePath("icon:" + pickedIcon); onChangesToCommit?.Invoke(); ReloadCardImage(); }); }
static void CommandDebugIconPicker(CommandArg[] args) { IconPickerDialog.Launch(result => HeadlessTerminal.Log("Icon picker result: " + (result == null ? "null" : result))); }