# UProperty wrapped by Marco(#if) doesn't work

**URL:** <https://forums.unrealengine.com/t/uproperty-wrapped-by-marco-if-doesnt-work/381059>\
**Category:** Blueprint\
**Tags:** macro, UProperty, unreal-engine, UE4, CPP, Blueprint, question\
**Created:** [January 6, 2017, 6:48am UTC](https://forums.unrealengine.com/t/uproperty-wrapped-by-marco-if-doesnt-work/381059 "2017-01-06T06:48:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tommy\_SS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tommy\_SS](https://forums.unrealengine.com/u/Tommy_SS)\
**Post date:** [January 6, 2017, 6:48am UTC](https://forums.unrealengine.com/t/uproperty-wrapped-by-marco-if-doesnt-work/381059/1 "2017-01-06T06:48:17Z")

</div>

#if AAA  
UPROPERTY(EditDefaultsOnly, Category = Test)  
float TestPurposeInMarco;  
#endif

The property TestPurposeInMarco is not showed in UnrealEngine blueprints

---

<div class="post-metadata">

**Author:** ![Tommy\_SS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tommy\_SS](https://forums.unrealengine.com/u/Tommy_SS)\
**Post date:** [January 6, 2017, 7:31am UTC](https://forums.unrealengine.com/t/uproperty-wrapped-by-marco-if-doesnt-work/381059/2 "2017-01-06T07:31:20Z")

</div>

AAA is defined, value is 1

---

<div class="post-metadata">

**Author:** ![Steve\_Robb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Steve\_Robb](https://forums.unrealengine.com/u/Steve_Robb)\
**Post date:** [January 6, 2017, 11:47am UTC](https://forums.unrealengine.com/t/uproperty-wrapped-by-marco-if-doesnt-work/381059/3 "2017-01-06T11:47:55Z")

</div>

Hi,

This does not work in general. Only a few macros and constants are known to the UnrealHeaderTool: WITH\_EDITOR, WITH\_EDITORONLY\_DATA, CPP, 0 and 1. Anything else inside a macro block will be ignored by the tool.

As of UE 4.13, this kind of thing produces an error instead of being ignored:

> **[Unreal Engine 4.13 Release Notes](https://docs.unrealengine.com/4.27/en-US/WhatsNew/Builds/ReleaseNotes/2016/4_13/)**

“New: Errors are now raised when a UnrealHeaderTool markup is in a skipped preprocessor block.”

Steve

---

<div class="post-metadata">

**Author:** ![Anonymous\_e5d5c0bf7d300728867097ff79906dbe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anonymous\_e5d5c0bf7d300728867097ff79906dbe](https://forums.unrealengine.com/u/Anonymous_e5d5c0bf7d300728867097ff79906dbe)\
**Post date:** [December 31, 2017, 4:47am UTC](https://forums.unrealengine.com/t/uproperty-wrapped-by-marco-if-doesnt-work/381059/4 "2017-12-31T04:47:33Z")

</div>

Thats a really bad design
