StatusBar.GetImage C# (CSharp) Method

GetImage() public method

public GetImage ( ) : Texture2D
return UnityEngine.Texture2D
    public Texture2D GetImage()
    {
        if(this.texture == null && this.useImage)
        {
            this.texture = (Texture2D)Resources.Load(DataHolder.HUDs().resourcePath+this.imageName, typeof(Texture2D));
        }
        else if(this.texture == null)
        {
            this.texture = new Texture2D(1, 1);
            this.texture.SetPixel(0, 0, DataHolder.Color(this.barColor));
            this.texture.Apply();
        }
        return this.texture;
    }