-
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
StateMachine<T> and StateMachine needs a common StateMachine base type #27
Comments
Right, I remember another aspect to this, while technically we can use And also |
Right, we have |
Hi @tomsseisums, Thanks for providing so much information! The issue you are talking about is one of the minor inconveniences of the way that UnityHFSM is implemented internally regarding its support for generics.
The "actual" As If UnityHFSM didn't support generics, the inheritance hierarchy would therefore look like this: classDiagram
class StateMachine
class HybridStateMachine
StateMachine <|-- HybridStateMachine
With generics, it looks like this: classDiagram
class StateMachineTTT["StateMachine[T, T, T]"]
class StateMachineTT["StateMachine[T, T]"]
class StateMachineT["StateMachine[T]"]
class StateMachine["StateMachine"]
class HybridStateMachineTTT["HybridStateMachine[T, T, T]"]
class HybridStateMachineTT["HybridStateMachine[T, T]"]
class HybridStateMachineT["HybridStateMachine[T]"]
class HybridStateMachine["HybridStateMachine"]
StateMachineTTT <|-- StateMachineTT
StateMachineTTT <|-- StateMachineT
StateMachineTTT <|-- StateMachine
StateMachineTTT <|-- HybridStateMachineTTT
HybridStateMachineTTT <|-- HybridStateMachineTT
HybridStateMachineTTT <|-- HybridStateMachineT
HybridStateMachineTTT <|-- HybridStateMachine
In other words, using As to the For more information on the use of generics, please check out the WIP README in the I hope I could clarify this. |
I have now written documentation on this topic which you can find in the wiki here. |
or
The text was updated successfully, but these errors were encountered: