- Home /
Change GUI element texture in C# when a boolean changes.
Hello!
I'm currently working on a game with Kinect and I want to implement some player feedback.
What I want to do is change an ui element when the player lifts an arm.
I have 2 textures, one arrow without color and one with color. When the boolean "leftArmUp" is beeing set in a script, the arrow on my screen should change to the one with color. So basicily something like:
if(leftArmUp){
Load texture with color;
}
else{
load texture without color;)
}
Where do I start with this? I'm completly new to UI elements in Unity!
Comment
Your answer
Follow this Question
Related Questions
GUI.Button Texture Swap? 3 Answers
How can i show the texture in the array? 2 Answers
More simple code not working 1 Answer
OnGui Function help 1 Answer
Repeat fade in and out 1 Answer