It currently seems impossible to expose an int as a bitmask and add a bitmask enum in a blueprint struct, the option just doesn’t exist as it does in regular blueprint variable creation. Am I just missing something here or is it actually absent?
Thanks ClockworkOcean, that’s a really nice plugin for sure, but I’m not seeing any evidence that it solves the particular issue I’ve identified here, maybe I’m missing something?
No, you’re right, it’s just not there…
@ClockworkOcean, for whatever reason, your comment seems to have disappeared here, but to work with bitmasks and bitflags ordinarily you create an enum and check “Bitmask Flags”, then in blueprint when you define an int variable, you can check “Bitmask” and set the enum to use for the flags. Unreal Tefel has a fantastic video that might help: link text
Yes, I looked it up. As far as I can see, no chance of incorporating them into a struct! :-/
you could use a bool
Well you can, just not in the struct - instead when using the struct.
Use node Make Bitmask
, select it, and in details pick the desired enum to use.
Depending on how and what your data is used for you could create a DataAsset In there it is possible to create bitmask enums.
So if your data is static I would advice this method.
If your data is static on a class or blueprint I would suggest moving this entry out of your struct (not ideal but possible)
If you need dynamic data I would advice @the_nikola 's method as at that point you need to create the data for the struct anyhow
Ref for data asset bitmask enum creation