can any one help me on this scrip?i want the play button to change the texture when i hover on it..it can switch scene but cant change the texture..
(comments are locked)
|
|
To get the button to change texture on hover you don't need any script at all. Just look into GUIStyle in the documentation. Oh, and there shouldn't be a ';' after if-else statements. how to adjust the GUI.style position??
Aug 26 '10 at 09:00 AM
nicole
What do you mean? There is no such thing as a GUIStyle position. GUIStyle is just something that tells unity how a GUI element should look like. You can specify a GUIStyle for every element by passing it as last parameter to the function creating that element. So in your case: GUI.Button(positionRect, icon, style);
Aug 26 '10 at 12:31 PM
StephanK
can give me simple code example?
Aug 27 '10 at 01:54 AM
nicole
There IS no code involved besides the line I already posted in my last comment. Just read the GUI tutorial and probably you will understand.
Aug 27 '10 at 10:38 AM
StephanK
solved it!thx alot:D
Aug 30 '10 at 02:14 AM
nicole
(comments are locked)
|
