public void Init(StationInventoryManager inventory, Resource resource) { this.inventory = inventory; this.resource = resource.Type; Name.text = resource.Type.ToString(); Icon.sprite = resource.GetComponent <SpriteRenderer>().sprite; Minimum.maxValue = inventory.Storage.Count(); Minimum.wholeNumbers = true; Minimum.onValueChanged.AddListener(OnMinimumChanged); Maximum.maxValue = inventory.Storage.Count(); Maximum.wholeNumbers = true; Maximum.onValueChanged.AddListener(OnMaximumChanged); }