# How to add varaiable into actor.h

**URL:** <https://forums.unrealengine.com/t/how-to-add-varaiable-into-actor-h/454395>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [August 25, 2019, 1:59pm UTC](https://forums.unrealengine.com/t/how-to-add-varaiable-into-actor-h/454395 "2019-08-25T13:59:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![XiaLi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@XiaLi](https://forums.unrealengine.com/u/XiaLi)\
**Post date:** [August 25, 2019, 1:59pm UTC](https://forums.unrealengine.com/t/how-to-add-varaiable-into-actor-h/454395/1 "2019-08-25T13:59:46Z")

</div>

Hi everyone. I want to add a new varaiable into actor.h. I have uesd

public:

UPROPERTY(EditAnywhere,BlueprintReadWrite, Category=Actor)

```
   int32 Team_ID;

```

It compiled successfully but I can’t find this varaiable from its inheritance classes.

So can someone give me a favor? Thank you.

---

<div class="post-metadata">

**Author:** ![MCX292](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MCX292](https://forums.unrealengine.com/u/MCX292)\
**Post date:** [August 26, 2019, 12:11am UTC](https://forums.unrealengine.com/t/how-to-add-varaiable-into-actor-h/454395/2 "2019-08-26T00:11:47Z")

</div>

You made this change in the engine source?

---

<div class="post-metadata">

**Author:** ![XiaLi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@XiaLi](https://forums.unrealengine.com/u/XiaLi)\
**Post date:** [August 26, 2019, 8:37am UTC](https://forums.unrealengine.com/t/how-to-add-varaiable-into-actor-h/454395/3 "2019-08-26T08:37:19Z")

</div>

yes，but I don’t know if this is feasible.

---

<div class="post-metadata">

**Author:** ![HarryHighDef](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HarryHighDef](https://forums.unrealengine.com/u/HarryHighDef)\
**Post date:** [August 26, 2019, 8:57am UTC](https://forums.unrealengine.com/t/how-to-add-varaiable-into-actor-h/454395/4 "2019-08-26T08:57:02Z")

</div>

Unless you are using a c++ compiled engine you have downloaded from the github or Unreals other source control changes made to the engine code won’t actually show up. The engine code you have in the versions on the launcher is more for reference than anything else.

---

<div class="post-metadata">

**Author:** ![MCX292](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MCX292](https://forums.unrealengine.com/u/MCX292)\
**Post date:** [August 26, 2019, 10:09am UTC](https://forums.unrealengine.com/t/how-to-add-varaiable-into-actor-h/454395/5 "2019-08-26T10:09:27Z")

</div>

It is feasible but there is generally no reason to do so.

You can create a new c++ class that inherits from Actor that has your new variable in it and you can do that without recompiling the engine (or risking messing up the code).

---

<div class="post-metadata">

**Author:** ![XiaLi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@XiaLi](https://forums.unrealengine.com/u/XiaLi)\
**Post date:** [August 26, 2019, 11:11am UTC](https://forums.unrealengine.com/t/how-to-add-varaiable-into-actor-h/454395/6 "2019-08-26T11:11:28Z")

</div>

Thank your advice. I’ll try this later.

---

<div class="post-metadata">

**Author:** ![XiaLi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@XiaLi](https://forums.unrealengine.com/u/XiaLi)\
**Post date:** [August 26, 2019, 11:13am UTC](https://forums.unrealengine.com/t/how-to-add-varaiable-into-actor-h/454395/7 "2019-08-26T11:13:45Z")

</div>

Thank you, HarryHighDef. Now I knew the reason. And I’ll create a new c++ class to do it.
