Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnComplete problem (again of course) with singleton classes #668

Open
kureysalp opened this issue Dec 21, 2023 · 0 comments
Open

OnComplete problem (again of course) with singleton classes #668

kureysalp opened this issue Dec 21, 2023 · 0 comments

Comments

@kureysalp
Copy link

kureysalp commented Dec 21, 2023

I have a singleton class that has an Integer. I am incrementing this integer by one when I start a tween and in OnComplete of that tween decreasing it by one. Each tween is created by separate objects.

Issue is if these I create these tweens so fast, in some of the OnCompletes ignores the singleton call but calls other thins with no problem.

transform.DOMove(slot.transform.position, moveTimeToSlots.Value).OnComplete(() => { GameStateManager.Instance.MethodSingleton(); // Sometimes not calling MethodOne(); // always calling MethodTwo(); // always calling });

Edit: When I call the MethodSingleton for example in MethodOne, it works flawlessly. So it's 100% OnComplete and Singleton problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant