Make a GUITexture's size grow

'ello everybody

I want to make a texture in the GUI gradually grow, so the player can see the size increase.

for example;
1
2
3
GO! (the GO! texture goes from being small to big)

How can I do this?

thanks

If a GUITexture, then you can use pixelInset. There are a few ways to use it. I like to have the parameters inside the function (ie)

var motor : float;
var show : boolean;
var start : boolean;
var texGO : GUITexture;

function Update() { 
	if(start) {
	motor += 20*Time.deltaTime;
    show = true;
	}
    if(motor>=300) {
    motor = 0;
    }
}

function OnGUI() {
	if (GUI.Button (Rect (10,20,150,50), "Test Button")) {
	start=!start;
	}
    if(show) {
	texGO.pixelInset = Rect (100, 100, motor, motor);
	}
}

This example was fun to play with. :smile: