Question by
Velissarios · May 23, 2016 at 04:20 PM ·
if-statementsif statement
I want to create a button to check if one skybox is enable and change it to another one.
So I have 2 public buttons b1,b2 and 3 public materials mat1,mat2,mat3. I an trying to create an if statement something like if(mat1 is active ) {b1 will change is to mat2 and b2 will change it to mat3)... Tried Input.GetButtonDown(b1) says it needs string, tried to name the buttons but didn't work think I made a mistake there also.. I made it work with switch and one button.. but I want 2 buttons and each button change to a different skybox.. :(
Comment
Your answer
Follow this Question
Related Questions
mathf.abs(0) is higher than 90, why? 1 Answer
How to put an if statement inside an if statement? 3 Answers
How to use or statements in an if statement. 1 Answer
If/else statement is always else 1 Answer
If an integer ends with an 1. 1 Answer