So essentially, what I want to do is highlight the button I press. I have got a way to do it but the problem is that my frame rate goes from 300 to 10 whenever I press a button. Here is what I did, but is there a better way to do it? I couldn't figure out how to just swap textures so this is the long way:
This does work. Its just not efficient in the least.
SOLVED: Essentially this is the change I made:
you can have variables with the different images of your buttons, pressed and unpressed, this will give you like 7 images 5 of 'g-h-v-b-n' unpressed, and 2 of 'g-h' pressed you only have the GUI.DrawTexture() once, but having a texture that will change its image value, once the button is pressed
this is the main idea of what i would do, also instead of drawing on the OnGUI, i would change that for a plane object, with the plane you will need change the material, as i know is more efficient than OnGUI, but first make the try
hope this helps you
answered May 09 '11 at 04:47 PM