Hi,
With a script I am adding an image on screen:
GUI.DrawTexture(new Rect(10,10,40,39), icon);
As you can see the coordinates are 10,10. When a certain condition happens, I want the image to be moved to a different location on screen. How do I change these coordinates?
NOTE: They must move instantly.
You could use variables in place of the coordinates and then change the variables with whatever condition.
make a boolean variable stored in class with GUI command and change it when condition happens
if (CertainConditionHappened)
{
GUI.DrawTexture(new Rect(20,20,40,39), icon);
}
else
{
GUI.DrawTexture(new Rect(10,10,40,39), icon);
}