- Home /
How To Add Button Images To GUIText?
I am very bad at explaining things so I made a sample to show what I am trying to accomplish:
http://i.imgur.com/LNxhU7X.png
So basically I am trying to do that with a GUIText. I don't want to make a texture for this because I want to have customizeable controls in my game. Is this possible?
you mean a button within a line of text? my only way for this is to use a GUItexture.
Answer by reppiz01 · Jul 08, 2013 at 08:39 AM
i am pretty sure that this is just possible with gui.texture, but that shouldn´t be a problem, even if oyu have customizeable control in your game.
for example you could save the controlls in a static class (pseudocode: texture2d buttonB; texture2d buttonB;
shoot = buttonA, jump = buttonB,
.... )
and when the player changes the controll you change shoot and jump f.e. shoot = buttonB; jump = buttonA;
you can take these values for your gui, so you don´t draw the buttonA or buttonB texture, instead you draw the "shoot" or "jump" texture.
hopefully it´s clear (my english is not the best)
Yeah I was thinking this, I was just seeing if there was another way.