How to access a DataTable using an enum

You’ll be surprised once you try to print that Enum->Name :slight_smile:

To make this particular conversion work, you’d need to go: enum → string → name.

Which is as horrible as it sounds.

7 Likes

Wow that worked, Thanks so much.

Hi

I’m trying to pull an animation from a data table I have made and I was trying to use a enum saved as a variable so that the correct row could be set easily. However I do not seem to be able to get this to work.

I does however work if I select the row name manually.

So for example this works:

However this does not work:

Any advice gratefully received.

Thanks

Ed

It won’t work in a packaged game, display enum names are editor-only

1 Like

Thank you very much, it has worked wonderfully for me. :clap: :clap: :ok_hand:

I can’t believe I wasted an entire day trying to figure out what was wrong with my code using this conversion. Just now I’m finding that this engine bug has been going on since UE4.7. I am currently using UE5.2

It’s not a bug. A name and a string are two different data sets, though they are compatible for ease of use. An enum will convert to string instead of name, but you could also just use convert to name. The best solution is to create a struct of Names and then it wouldn’t be an issue because you don’t need to convert them.

1 Like