GUITexture.enabled property does not work

Hi everybody,

I’m a completely newbie in Unity, I’ve started only 20 days ago with a bundle of books… I’m reading the first one: Unity 3.x Game development essentials.

In the 6th chapter of that book, HUD is explained and the book tells me to disable the GUI Texture object with the small checkbox in the top-left corner of the inspector, then it wants me to re-enable it in scripting.
it uses chargeHudGUI as a GUITexture variable (assigned in the inspector by dragging and dropping it into the script box in the inspector) and in a method named HUDon() it tells me to re-enable it by using chargeHudGUI.enabled = true if it was not enabled before (so if(!chargedHudGUI.enabled)).

But it does not work: the method is called, but it does not work properly as I cannot see my Hud appear after its execution. So I removed the if statement, but nothing changed… the I have looked into the VS Intellisense and I have found the active property and tried… it finally works, but that property has been deprecated so I need to know what is wrong with the enabled property…

Any ideas?

Thanks!

Jymmy097

Okok, solved the issue: I have disabled the entire component with the checkbox near the blue, green and red cube of the inspector while I should have disabled the GUITexture component… well, now it works fine…

Thanks anyway…

Jymmy097