-
Notifications
You must be signed in to change notification settings - Fork 40
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
ue4 integration #13
Comments
Hi there, If you disable RTTI, you'll need to add the DEFINE_HSM_STATE() macros in each of your states to inject the custom RTTI info needed by hsm. Check out the info in the documentation: If you haven't already, I highly recommend reading the doc. Let me know if that works for you! I've shipped UE4 multiple games that use HSM, so it should work out just fine. |
Hi, this is what I am doing right now (just leaving 1 state in there) and the baseState in there in case I happen to be using the wrong syntax; struct MyStates
}; this throws me all of these erors: which are basically the same for every state I Define |
So I downloaded the second latest release (1.5) and had to comment the line //static_assert(std::is_convertible<TargetState, State>::value, "TargetState must derive from hsm::State"); and add this define at the start to make it build Seems to me there must be something missing in the latest release or the syntax of something has changed which I am not aware off. |
This assert is important, you should not remove it. If you're triggering it, it means you've probably added a DEFINE_HSM_STATE somewhere you shouldn't. This macro should only really be added to the actual states you transition to, not to base classes for your states. I noticed in the code you pasted above that you had added this macro to your BaseState, which you shouldn't be doing (see this example: https://github.com/amaiorano/hsm/blob/master/samples/hsm_book_samples/source/ch3/drawing_hsms.cpp).
This is correct. You are supposed to define this to 0 to disable C++ RTTI, and make use of the custom RTTI. I assume you had already done this even before downgrading.
I think you found a bug in the latest version related to custom RTTI. When I get the chance, I'll take a look and see what's up. For now, using 1.5 should be perfectly fine. |
I'm trying to use the HSM with ue4, however enabling RTTI in ue4 makes packagingimpossible, but when I don't enable it I can't seem to get it to work because of the RTTI.
The text was updated successfully, but these errors were encountered: