Help with recttransform lerp , lags on mobile not on pc.

Why is this code lagging on my mobile ( android ) ,whenever it runs and not on my pc? . Please help anyone!!

@DiegoSLTS

public void AboutBtn() { StartCoroutine(about()); }

 IEnumerator about()
 {
     float elapsedTime = 0f;
     float lerpDuration = 1f;
     menuBool = true;
     menuBarAnim.Play("menuBarAnimationB");
     sidebarAnim.Play("SideBarAnimB");
     Vector2 Origin = MoverR.anchoredPosition;
     Vector2 Destix = new Vector2(Origin.x, -3658); //replace 6050 with the position you want
     while (elapsedTime < lerpDuration)
     {
         elapsedTime += Time.deltaTime;
         MoverR.anchoredPosition = Vector2.Lerp(Origin, Destix, elapsedTime);
         yield return null;
     }
     anim = false;
     menuBool = false;
 }

Nevermind , solved it . The problem was the canvas had pixelperfect (true) , making it false doubled the performance no lag now. :slight_smile: