itween scaleTo a label text?

Hello,

I currently have a little scorebar on the top right of my screen using the following:


void OnGUI()
{

    GUILayout.BeginArea(new Rect (Screen.width-275, 0, 250, 25));  
    GUILayout.BeginHorizontal();
    GUILayout.FlexibleSpace();

    // displaySeconds is a simple timer that counts down from 60 (integer). 
    GUILayout.Label(displaySeconds.ToString(),FontStyle); 
    GUILayout.Space(35);
    GUILayout.Label(score.ToString(),FontStyle); 
    
    GUILayout.EndHorizontal();
    GUILayout.EndArea();

        
}

What I’m trying to do is use itween to scale/zoom the number a bit when it’s less than 10 (grab the users attention to let them know time is running out).

But I can’t figure out how to use itween with guilayout.label. Does anyone have any ideas on how to accomplish this?

I’m assuming I could scale the object using:


originalScale = new Vector3(gameObject.transform.localScale.x, gameObject.transform.localScale.y, gameObject.transform.localScale.z);
    void ScaleDown()
    {
    	iTween.ScaleTo(gameObject, iTween.Hash("scale", originalScale, "time", 1f, "easeType", iTween.EaseType.easeInSine));
    }
    
    void ScaleUp()
    {
    	iTween.ScaleTo(gameObject, iTween.Hash("scale", new Vector3(2f, 2f, 2f), "time", 1f, "easeType", iTween.EaseType.easeOutSine));
    }

Yep, after a lot more investigating I’ve ended up adapting the suggestion from the following forum post:

http://forum.unity3d.com/threads/28312-A-smooth-(ease-in-amp-out)-version-of-Lerp?p=185311&viewfull=1#post185311