-
Notifications
You must be signed in to change notification settings - Fork 141
Description
Hello. I'm an everyday user of LeanTween in my projects. I noticed a weird bug. It appears that some LT commands glitch heavily when using .setIgnoreTimeScale(false). Of course, you may not use it, but it's important to report.
I opened a brand new project, added a simple TextMeshPro object to an Overlay Canvas. I added a CanvasGroup to it. The following does not work. If I comment out the .setIgnoreTimeScale line, it works.
`
public class LeanTweenTest : MonoBehaviour
{
[SerializeField] private CanvasGroup canvasGroup = default;
[SerializeField] private float duration = 0.15f;
[SerializeField] private float startingAlpha = 0f;
[SerializeField] private float targetAlpha = 1f;
[SerializeField] private bool ignoreTimeScale = false;
private int currentTweenId;
private void Start()
{
LeanTween.cancel(currentTweenId);
currentTweenId =
LeanTween.alphaCanvas(canvasGroup, targetAlpha, duration).setFrom(startingAlpha)
.setLoopPingPong()
.setIgnoreTimeScale(ignoreTimeScale)
.uniqueId;
}
}
`
Of course, I will work around it for now, but I thought it was worth pointing out.
This was tested on an URP project in Unity 2020.3.13f1.