Here’s my code below. I can get the animation to run at increments of the main speed but any time I go over 1 it doesn’t go any faster.
clipReverse = new AnimationClip ();
clipReverse.name = "reverse";
curve2 = AnimationCurve.Linear ( 0f, 0f, 1.0f, -1.0f );
clipReverse.SetCurve ( "", typeof ( Material ), "_MainTex.offset.y", curve2 );
anim.AddClip ( clipReverse, clipReverse.name );
anim.wrapMode = WrapMode.Loop;
if ( currentClipName != null !currentClipName.Equals ( "" ) )
{
foreach ( AnimationState state in anim )
{
//state.speed = conveyorBeltTransform.GetComponentInChildren<ConveyorBeltTrigger> ().conveyorBeltPower / 55;
state.speed = 10;
}
anim.Play ( currentClipName );
}