public void init(Recipe recipe, WorkbenchUI ui) { this.recipe = recipe; this.ui = ui; image.sprite = recipe.result.itemGroup.sprite; }
public void Start() { // getting the refrence of the workbench ui from the popup ui, and storing both popupUI = GameObject.FindGameObjectWithTag("PopupUI").GetComponent <PopupUI>(); workbenchUIGameObject = popupUI.workbenchUI; ui = workbenchUIGameObject.GetComponent <WorkbenchUI>(); }
public void Awake() { ui = transform.parent.GetComponent <WorkbenchUI>(); }