-
Notifications
You must be signed in to change notification settings - Fork 119
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
Make some of the async operations cancellable by passing a CancellationToken #1
Comments
Hi, I was trying to figure out how to do this myself, but if I stop the player before an async method has completed, it will continue to run in editor mode, causing issues. I haven't managed to come up with a working way of cancelling. Here's what I have currently, any suggestions would be greatly appreciated!
The problem with that is that unity then complains that I'm performing Unity API calls in SetBomb that aren't in the main thread. Full script: |
Any news on this? |
Task.Run creates a thread for you. Should be okay to just run SetBomb directly.
|
I run an async func in Unity and it will last an long time |
No description provided.
The text was updated successfully, but these errors were encountered: