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

Add UniTask.WaitUntil overload which takes a target to avoid closure allocation #562

Open
laicasaane opened this issue Apr 2, 2024 · 1 comment

Comments

@laicasaane
Copy link

laicasaane commented Apr 2, 2024

For the context of this proposal:
Since UniTask.WaitUntilValueChanged uses IEqualityComparer to detect if the value has changed, its logic is totally different from UniTask.WaitUntil. So I can't just replace WaitUntil with WaitUntilValueChanged.

My use case is:

var component = await UniTask.WaitUntil(gameObject, static x => x.GetComponent<MyComponent>());

// do something to the retrieved component
@neuecc
Copy link
Member

neuecc commented Apr 5, 2024

I think it's a good idea to add (TState, Func) overloads throughout.

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

2 participants