0

When triggering a UI Animation for the first time it seems to lag for a moment, then runs the animation faster than it should. If I trigger the same animation again, it will run perfectly.

This is only happening when executed on an android device, it runs fine when testing in Unity.

Any ideas?

Here's an example of transforming one of my option windows.

[SerializeField]
private GameObject _newPlayerWindow;

public void test() {
      _newPlayerWindow.LeanMoveLocalY(0.0f, 1.0f).setEaseOutBounce();
}
nerotech
  • 49
  • 1
  • 7
  • Sounds to me as if the application might just be stalling for a moment the first time you interact with something. Try checking if something’s causing a big spike in the profiler at that time. – Sven Viking Apr 11 '22 at 15:10
  • have you tried calling [LeanTween.init(800)](http://dentedpixel.com/LeanTweenDocumentation/classes/LeanTween.html#method_LeanTween.init) on app start? This way the LeanTween data structure is already created, before the first tween is started. – JeanLuc Apr 12 '22 at 20:45

1 Answers1

0

For any future readers that have this issue. I switched the Scripting Backend from Mono to IL2CPP in the player settings, now everything runs perfectly first time.

nerotech
  • 49
  • 1
  • 7