Script/Transition/TransformExtention.cs
/// <summary>
/// Scale In along X a Ui Transform
/// </summary>
/// <param name="transform">self transform</param>
/// <param name="duration">scale tween duration</param>
/// <param name="easeType">tween easeType</param>
/// <param name="onCompleteCallback">scale in completion callback</param>
/// <param name="blockRaycast">block raycasts during tweening</param>
/// <returns>returns Tweener that can be used for other purposes.</returns>
Scale In along X a Ui Transform
Scale In along X a Ui Transform
public static Tweener ScaleInX(this Transform transform,
            float duration,
            Ease easeType = Ease.Linear,
            Action onCompleteCallback = null,
            bool blockRaycast = false)
        {
            CanvasGroup image = InitCanvasGroup(transform, blockRaycast);
            transform.localScale = new Vector2(0, 1);
            Tweener tween = transform.DOScale(new Vector3(1, 1, 1), duration);
            FillInTween(easeType, onCompleteCallback, image, tween);
            return tween;
        }
public static Tweener ScaleInX ( this Transform transform , float duration , Ease easeType = Ease . Linear , Action onCompleteCallback = null , bool blockRaycast = false ) { CanvasGroup image = InitCanvasGroup ( transform , blockRaycast ) ; transform . localScale = new Vector2 ( 0 , 1 ) ; Tweener tween = transform . DOScale ( new Vector3 ( 1 , 1 , 1 ) , duration ) ; FillInTween ( easeType , onCompleteCallback , image , tween ) ; return tween ; }
Scale In along X a Ui Transform
Scale In along X a Ui Transform
returns Tweener that can be used for other purposes.
returns Tweener that can be used for other purposes .
Transform
this
duration
float
scale tween duration
scale tween duration
easeType
Ease
None
onCompleteCallback
Action
scale in completion callback
scale in completion callback
blockRaycast
bool
block raycasts during tweening
block raycasts during tweening
transform
None