I assume this is some function of Unity (though I am not sure.) if it is, is there a way to turn it off? if it matters here is my code.
using UnityEngine;
using System.Collections;
public class BarCounter : MonoBehaviour {
public int maxVirtual;
public int maxGraphical;
public int value;
public string type;
public Vector3 refferencePoint;
void FixedUpdate(){
if(type == "health"){value = PublicMethods.health;}
else if(type == "mana"){value = PublicMethods.mana;}
else if(type == "progress"){value = PublicMethods.progress;}
transform.localScale = (new Vector3((maxGraphical / maxVirtual) * value,1,1));
transform.position = refferencePoint + new Vector3((((maxGraphical / maxVirtual) * value) / 2) * 0.04F - 5,0,0);
}
}
maxVirtual is the statistic's max. maxGraphical is the max length I want the bar to be.