protected override void Awake() { _barsList = new List <CustomImage>(); for (float i = 0.1f; i < 0.5f; i += 0.05f) { Bar = CreateGameObject.CreateChildGameObject <CustomImage>(transform).GetComponent <CustomImage>(); Bar.color = Color.yellow; Bar.rectTransform.sizeDelta = new Vector2(50, 10); Bar.SetAnchorsAndPivot(new Vector2(0, i), new Vector2(0, i), new Vector2(0, 0)); Bar.enabled = false; _barsList.Add(Bar); } base.Awake(); }