Hello, i get this error message, the thing is the gui texture is asigned in the inspector, and even works ingame (it shortens fine). What do you thing maybe the cause?, also, if i can find the cause how can i hide this error from appearing?
UnassignedReferenceException: The variable healthGUI of 'FPSPlayer' has not been assigned.
You probably need to assign the healthGUI variable of the FPSPlayer script in the inspector.
The code is basically this:
var healthGUI : GUITexture;
function UpdateGUI () {
var healthFraction = Mathf.Clamp01(hitPoints / maximumHitPoints);
healthGUI.pixelInset.xMax = healthGUI.pixelInset.xMin + healthGUIWidth * healthFraction;
}
Thanks