- Home /
Problem on guiTexture.pixelInset
hi there,
im trying to rewrite the values of my pixelInset.xMax like this, ## Code ## HPGUIGreen.guiTexture.pixelInset.xMax = HPGUIGreen.guiTexture.pixelInset.xMin + healthGUIWidthGreen
but i gets an error #Cannot modify a value type return value of `UnityEngine.GUITexture.pixelInset'. Consider storing the value in a temporary variable# and i make a variable to store the xMax value like this.
TempStorage = HPGUIGreen.guiTexture.pixelInset.xMax;
TempStorage = HPGUIGreen.guiTexture.pixelInset.xMin + healthGUIWidthGreen;
the errors gone, but when i did something like this, the xMax value of the were not dropping when i reduce the values of the healthGUIWidthGreen.
can any one tell me whats wrong with my code?
much thanks to those who read or reply.
Your answer
Follow this Question
Related Questions
Fade script working but I can't 'see' it working? (Solved) 1 Answer
Reduce Draw call for Multiple GUI Textures with same Texture 1 Answer
Is there an issue when playing a Movie Texture as a GUITexture? 1 Answer
Changing GUITexture's position through code (relative to screen) 1 Answer
GUItexture Borders & Pixel Inset concept 0 Answers