private void Awake() { ores = Constants.GetOres(); _updateOresInfo = oresMenuContent.GetComponent <UpdateOresInfo>(); // _updateListOresInfo = listOresMenuContent.GetComponent<UpdateListOresInfo>(); FindTextValues(); void FindTextValues() { var children = sellMenuContent.transform .GetComponentsInChildren <Transform>(); foreach (var child in children) { if (child.gameObject.CompareTag("Value")) { textValues.Add(child.gameObject .GetComponent <TextMeshProUGUI>()); } } if (textValues.Count != Constants.oresAmount) { Debug.LogError("ERROR!"); } } }
public void SetContentInfo() { UpdateOresInfo.SetValues(listPanelValues, SingleExtractedOresCounter.ores); }