Attach Metadata to static mesh actors

Hey guys, I’m new to ue4 c++ (not c++ in general) and I’m hoping someone can help me with an approach to attaching Metadata to static mesh actors.

I’m using ue4 to develop a non game application for ios. In this app, I need to attach Metadata to all my static mesh actors so that users of the app can select an object from the scene and view this data. The data will just be a set of key-value pairs, probably strings, so nothing fancy there.

I also need this data to be easily editable in the editor, so that other artists can set it up with out the need to dive into code.

What’s the best way to do this? Create a new class which has the data attributes in it, then convert all my static mesh actors to this class? Is there a way to automate this? Or would every mesh added from the content browser have to be manually converted?

Any advice here would be appreciated.

Thanks,

Ok so this is actually really simple - no need for custom c++ classes (although I’m sure that would also work)

Simply create a new Blueprint with a class of Actor Component. The data, and any functionality associated with that can be scripted inside the blueprint.

The component can then be added to actors in the scene as necessary. Making variables public allows other artists in my team to edit the meta data per object.

Here’s a really good reference for this technique:

I can even use the Blutilities functionality to automate the process of adding these to all components in the scene!