Ani.Mate a custom property

I’m trying to animate the height of my menu, just to understand better how to use Ani.Mate, but I’m not having any luck. The menuHeight always remains 10. This should be possible, right?

var menuWidth:int = 160;
var menuHeight:int = 10;
private var menuRect:Rect;

function Start() {
	menuRect = Rect(Screen.width / 2 - menuWidth / 2, Screen.height / 2 + Screen.height * .1, menuWidth, menuHeight);
	Ani.Mate.To(this, 1, { "menuHeight":200 });
}

function OnGUI() {
	Debug.Log(menuHeight);
	menuRect.height = menuHeight;
}

Hm, the dynamic methods I introduced in 1.5 don’t like to do implicit type conversions and a change I did in 1.6 to stop erroneous animations suppresses the exception so you don’t see the error.

I just decided to fix this and release AniMate 1.7. Implicit conversions now work again, meaning you can supply an int to animate a float. I also fixed an internal routine that returned a float when animating ints. An exception that stops an animation will now also print an error.

Woo! Thanks!

Can’t wait till I’m useful enough to give back to this community that just keeps on giving!

Correct me if I’m wrong, but did something change with the easing in the new version? No matter what type of easing I choose it is still animating linearly. If I use Ani.Mate v1.6 it works fine.

Oh, you’re right. My bad.

See this post for details:
http://forum.unity3d.com/viewtopic.php?p=211643#211643