# How can I create a Sub-Object Property in my custom UActorComponent class, to access from Blueprint?

**URL:** <https://forums.unrealengine.com/t/how-can-i-create-a-sub-object-property-in-my-custom-uactorcomponent-class-to-access-from-blueprint/334888>\
**Category:** UI\
**Tags:** hud-blueprint, hud, unreal-engine, question\
**Created:** [October 10, 2015, 6:05pm UTC](https://forums.unrealengine.com/t/how-can-i-create-a-sub-object-property-in-my-custom-uactorcomponent-class-to-access-from-blueprint/334888 "2015-10-10T18:05:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![DanaFo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DanaFo](https://forums.unrealengine.com/u/DanaFo)\
**Post date:** [February 3, 2016, 7:28am UTC](https://forums.unrealengine.com/t/how-can-i-create-a-sub-object-property-in-my-custom-uactorcomponent-class-to-access-from-blueprint/334888/2 "2016-02-03T07:28:01Z")

</div>

You need to make the member variable visible and editable in blueprints, here are the parameters explained:

> **[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 — ue4community.wiki! You will be able to find content from the official...

most commonly though:  
(inside your component .h)

```
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = whateveryouwant)
membervariabletype membervariablename;

```

in the object constructor, initialize it:

```
APlayerPawn:APlayerPawn()
{
membervariablename = blah;
}

```

Then in the HUD, drag off the cast of the AMyCharacter and search for the member variable name.

---

_[View the full topic](https://forums.unrealengine.com/t/how-can-i-create-a-sub-object-property-in-my-custom-uactorcomponent-class-to-access-from-blueprint/334888)._
