# How to use GetMetaData in game

**URL:** <https://forums.unrealengine.com/t/how-to-use-getmetadata-in-game/423639>\
**Category:** Platform & Builds\
**Tags:** source-code, macro, unreal-engine, question\
**Created:** [April 26, 2018, 8:06am UTC](https://forums.unrealengine.com/t/how-to-use-getmetadata-in-game/423639 "2018-04-26T08:06:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnson3d1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@johnson3d1](https://forums.unrealengine.com/u/johnson3d1)\
**Post date:** [April 26, 2018, 8:06am UTC](https://forums.unrealengine.com/t/how-to-use-getmetadata-in-game/423639/1 "2018-04-26T08:06:08Z")

</div>

I can’t use GetMetaData in DebugGame Configuration,because that macro HACK\_HEADER\_GENERATOR is defined by 0.When i try to add PublicDefinitions.Add(“HACK\_HEADER\_GENERATOR=1”) in Build.cs file.cxx compile will get 2 link error finally. What’ wrong with me?

---

<div class="post-metadata">

**Author:** ![njivkov](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@njivkov](https://forums.unrealengine.com/u/njivkov)\
**Post date:** [May 14, 2018, 7:39am UTC](https://forums.unrealengine.com/t/how-to-use-getmetadata-in-game/423639/2 "2018-05-14T07:39:13Z")

</div>

I am having the same problem, I have a plugin that needs to utilize GetMetaData and HasMetaData, but in a game config they are not available unless you define HACK\_HEADER\_GENERATOR=1. Even after that it fails when linking as it can’t find the UField::GetMetaData and UField::HasMetaData symbols. I have tried to modify the entire cs config for the UE4Game.Target.cs, or the configurations for my specific game, or the plugin configs adding PublicDefinitions as Johnson stated above but after (full rebuild in some cases) there is still the same linking issue. Has someone else able to make this work?

---

<div class="post-metadata">

**Author:** ![yanghua](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@yanghua](https://forums.unrealengine.com/u/yanghua)\
**Post date:** [September 6, 2018, 6:16am UTC](https://forums.unrealengine.com/t/how-to-use-getmetadata-in-game/423639/3 "2018-09-06T06:16:10Z")

</div>

Me too. What can I do

---

<div class="post-metadata">

**Author:** ![yanghua](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@yanghua](https://forums.unrealengine.com/u/yanghua)\
**Post date:** [September 6, 2018, 7:43am UTC](https://forums.unrealengine.com/t/how-to-use-getmetadata-in-game/423639/4 "2018-09-06T07:43:19Z")

</div>

I have the same problem, have you solved it?

---

<div class="post-metadata">

**Author:** ![6r0m](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/6r0m/32/1194563_2.png) [@6r0m](https://forums.unrealengine.com/u/6r0m)\
**Post date:** [December 25, 2020, 9:41am UTC](https://forums.unrealengine.com/t/how-to-use-getmetadata-in-game/423639/5 "2020-12-25T09:41:23Z")

</div>

Could somebody read meta in the package?
