Use Bitmask over 32 Enums?

Hi, I’m struggling with how to use Bitmask for over 32 Enums. I want to make an int value in DataTable as a multi-check Bitmask, but the UE4 engine seems to not support Bitmask for values larger then int32. what should i do to Bitmask? or something else can make a multi-check function in DataTable?

what about array of structs and custom pure functions?

image

image

I think bitmasking is good for high performance long data crunching tasks only

Maybe it’s not a good idea to use bitmask if enum’s count is too big. I use bitmask just because i want to directly set data in DataTable Property Editor, but not convert a binary to decimal number outside the Editor. maybe i can make an editor utility widget to do that convertion. tks for ur reply.
btw, now i’m wondering if someone else has the same problem or desire with the bitmask.
i found that the bitmask doesn’t show all enum value in editor if the enums too much, for instance , i define 30 enums but the editor just show 29 enums, the last one doesnot show.

1 Like

I consider myself a medium skilled programmer. I did it all my life time to time but I am not a code guru. Last week I was digging about bitmaking and its very interesting but I think is not too friendly to be used on blueprints because you get spaghetti code very easily.

In C++ seems more clean.

yes, i use it just to set number value offline. The real code logic is written in c++.
means c++ function load the data set in Datatable as bitmaking, while Datatable’s data set mannuly offline through property editor.

1 Like