Download

Can you add tags to static meshes, or only to actors?

I’m using a construction script to spawn some walls and doors in a semi-random configuration and I want to be able to check and see if an arbitrary mesh component is a door or a window, etc. I thought the obvious answer was to add tags to my meshes (this mesh = door, etc) but the issue is, you seem to only be able to add tag to actors, and so when I’m looking at my static mesh in the content browser I can’t see the area in the details pane where I should be able to add tags to it. Is there any workarounds to this? Can I ‘promote’ a mesh to an actor so I can tag it? If I do that, how can I reference it in the construction script?

There are component tags. When in Blueprint you do Add StaticMesh Component, there is a small section in the list “Component Tag”.

https://dl.dropboxusercontent.com/u/2300830/componentanttag.jpg

Only actors has tags, and the static mesh you see in asset browser is not actor. Also i don’t really understand why you would tag static mesh on its own.

Fair question! In my construction script I’m building simple houses dynamically, picking from sets of meshs for each wall. I can’t know ahead of time if what will spawn will be a door, or a window, or what, so I’d like to be able to tag and categorize my items so that all the ‘wall’ meshes have tag=‘wall’. That way I can check and do things like add window meshes on the ‘wall’ component but not on the ‘doorway’ component, etc.