void Update() { resourceBar.SetMaxRes(totalRes); resourceBar.SetRes(currentRes); resourceBar.SetMaxResText("Макс. " + totalRes.ToString()); resourceBar.SetCurrentResText(currentRes.ToString()); //resourceText.GetComponent<TextMesh>().text = totalRes.ToString(); }