- Home /
Showing .png on button press
So I've looked around and can't find anything that explains this so here we go:
I've got my game and I've set up several different buttons and I need them to show a .png file when the button is pressed but I'd like to have a different image depending on weather you left click or right click.
The main problem is I don't know how to show a .png file when the buttons pressed.
Any help is appreciated. Thanks in advanced.
Answer by Cherno · May 23, 2014 at 02:23 PM
Texture2D image Texture2D image1 Texture2D image2 bool showImage
if the button is clicked (left mouse button) -> showImage = true -> image = image1
if the button is clicked ((right mouse button) -> showImage = true; -> image = image2
if showImage = true -> GUI.DrawTexture(image)
Your answer
Follow this Question
Related Questions
Blurry Texture Help 5 Answers
Is it possible to detect which GUIStyleState is used? 2 Answers
make game work on older iphone 1 Answer
Simple Drop down list 1 Answer
Problem Image GUI 2 Answers