# Referencing UMG Class Variables in C++?

**URL:** <https://forums.unrealengine.com/t/referencing-umg-class-variables-in-c/43879>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [October 6, 2015, 9:55am UTC](https://forums.unrealengine.com/t/referencing-umg-class-variables-in-c/43879 "2015-10-06T09:55:08Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![anonymous\_user\_6334e343](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6334e343](https://forums.unrealengine.com/u/anonymous_user_6334e343)\
**Post date:** [October 6, 2015, 12:10pm UTC](https://forums.unrealengine.com/t/referencing-umg-class-variables-in-c/43879/2 "2015-10-06T12:10:38Z")

</div>

You add the modules in YourProjectName.Build.cs  
What you want for the refrence is a

```auto

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "My Widget, Sub My Widget")
UUserWidget* MyUMGWidget;

```

There is a wiki on extending user widget that may be of some help.

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

---

_[View the full topic](https://forums.unrealengine.com/t/referencing-umg-class-variables-in-c/43879)._
