public static ITweenable<Vector2> DTAnchoredPositionTo(this RectTransform transform, Vector2 to, float duration = 0.3f) { var tweenTarget = new RectTransformAnchoredPositionTarget(transform); var tween = Vector2Tween.Create(); tween.Initialize(tweenTarget, to, duration); return tween; }
/// <summary> /// tweens the RectTransforms anchoredPosition property /// </summary> /// <returns>The kanchored position to.</returns> /// <param name="self">Self.</param> /// <param name="to">To.</param> /// <param name="duration">Duration.</param> public static ITween<Vector2> ZKanchoredPositionTo( this RectTransform self, Vector2 to, float duration = 0.3f ) { var tweenTarget = new RectTransformAnchoredPositionTarget( self ); var tween = Vector2Tween.create(); tween.initialize( tweenTarget, to, duration ); return tween; }