iTween.ScaleTo C# (CSharp) Method

ScaleTo() public static method

Changes a GameObject's scale over time with FULL customization options.
public static ScaleTo ( GameObject target, Hashtable args ) : void
target GameObject
args Hashtable
return void
    public static void ScaleTo(GameObject target, Hashtable args)
    {
        //clean args:
        args = iTween.CleanArgs(args);

        //additional property to ensure ConflictCheck can work correctly since Transforms are refrences:
        if(args.Contains("scale")){
            if (args["scale"].GetType() == typeof(Transform)) {
                Transform transform = (Transform)args["scale"];
                args["position"]=new Vector3(transform.position.x,transform.position.y,transform.position.z);
                args["rotation"]=new Vector3(transform.eulerAngles.x,transform.eulerAngles.y,transform.eulerAngles.z);
                args["scale"]=new Vector3(transform.localScale.x,transform.localScale.y,transform.localScale.z);
            }
        }

        //establish iTween:
        args["type"]="scale";
        args["method"]="to";
        Launch(target,args);
    }

Same methods

iTween::ScaleTo ( GameObject target, Vector3 scale, float time ) : void
iTween