-
Notifications
You must be signed in to change notification settings - Fork 107
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: OnActiveStateChanged event? #22
Comments
This event sounds pretty useful.
…On Sun, May 14, 2023, 7:11 AM santutu ***@***.***> wrote:
I suggest to add an Active StateChanged event to StateMachine class to
track the state.
I took a quick look at the code, and I think it would be possible by
invoking the event at StateMachine's ChangeState method. if this function
is ok, I am willing to do pull request.
simple example
fsm.OnActiveStateChanged += (activeState)=> Debug.Log(activeState);
—
Reply to this email directly, view it on GitHub
<#22>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKNKVBNQHX53I5EOOQE3JZTXGDRXHANCNFSM6AAAAAAYBF6IAQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi @santutu, I have merged your PR and made a few small changes. It will be released with the upcoming 2.1 version. As I have not encountered a real-world use case for this feature myself, I'll be rolling out this feature conservatively, starting with a minimal version and seeing how well it fares. Future versions may then include enhancements, once I know more about how this feature is used. |
+1, this feature would also be useful for my project |
The "state changed" event is now available in the latest release (2.1) 👍 |
I suggest to add an Active StateChanged event to StateMachine class to track the state.
I took a quick look at the code, and I think it would be possible by invoking the event at StateMachine's ChangeState method. if this function is ok, I am willing to do pull request.
simple example
fsm.OnActiveStateChanged += (activeState)=> Debug.Log(activeState);
The text was updated successfully, but these errors were encountered: