using UnityEngine; using UnityEngine.UI; namespace DIG.UIExpansion { [RequireComponent(typeof(Image))] public abstract class BarFill : MonoBehaviour { public Image FillImage; private void Reset() { FillImage = GetComponent(); InitilizeSliderBar(); } private void Awake() { FillImage = GetComponent(); InitilizeSliderBar(); } /// /// Here you sets corect image values and gets the image /// public abstract void InitilizeSliderBar(); } }