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

[Feature Request] States that use tasks instead of Coroutines #45

Open
TdXYZ opened this issue May 11, 2024 · 1 comment
Open

[Feature Request] States that use tasks instead of Coroutines #45

TdXYZ opened this issue May 11, 2024 · 1 comment

Comments

@TdXYZ
Copy link

TdXYZ commented May 11, 2024

Starting from Unity 2023.1, there is now an Awaitable class that makes it possible to use async/await functionality. It may be beneficial to add a sort of TaskState as an alternative to the CoState, as TaskStates could get around some of the limitations such as not being able to use lambdas,

@Inspiaaa
Copy link
Owner

Hi @TdXYZ,
thanks for the feature request!

I didn't know about the Awaitable feature in the latest versions of Unity. Your proposal to have a new state class that works with Awaitable is a good idea!
As I'm quite close to releasing version 2.1, I'll implement it in the next version of UnityHFSM. By using C# preprocessor directives, I intend to stay compatible with older versions of Unity while also supporting the latest features.
I'll keep this issue open until I have implemented it.

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