Alex Stevens Profile picture
@MilkyEngineer@mastodon.gamedev.place Software Engineer @Gameloft_ANZ; #VRDev; #UEDev Prev: @TheOrphanage_au @EpicGames, @BondiLabs

Mar 9, 2021, 9 tweets

Struggling to keep track of name/string values in @UnrealEngine for your game logic? Need a lightweight way to standardise those tags? Check out Gameplay Tags!

#UETips

Any added tag can be viewed from the Gameplay Tags window in Project Settings. Any tag that you add will be stored centrally, promoting reuse and will prevent you (or your team) from any pesky spelling mistakes. You can even store them in separate .ini files!

If later, you decide "Nah, that was a terrible name!", you can just rename the tag, and let the system redirect any assets using the old tag to the new one!

Now when using a tag, it's as easy as selecting it from the drop down list!

Tags are hierarchical, meaning you can check if one tag is the child of another, like so:

Most use the "Gameplay Tag" type, however a special "Gameplay Tag Container" type allows you to specify multiple tags at once.

There's also useful stuff like tag queries:

And one of the best features? You can see what assets are referencing your tags!

You might be asking? Alex, surely there's a performance hit in using these? And I would say nope, as they are just a wrapped struct around the Name type (which don't compare strings).

See for yourself (tie your GitHub account to Epic Games for access):
github.com/EpicGames/Unre…

In fact, if you're currently using strings instead of Gameplay Tags or Names, I'd urge you to start using Gameplay Tags instead. String comparisons are a killer for performance!

There's more cool stuff here, like restricted tags and queries... Check it out!
docs.unrealengine.com/en-US/Programm…

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling