# Use BP Enumeration asset as UPROPERTY in c++ class

**URL:** <https://forums.unrealengine.com/t/use-bp-enumeration-asset-as-uproperty-in-c-class/327332>\
**Category:** Blueprint\
**Tags:** enumeration, custom-component, ENUM, unreal-engine, Blueprint, CPP, question\
**Created:** [August 1, 2015, 11:13pm UTC](https://forums.unrealengine.com/t/use-bp-enumeration-asset-as-uproperty-in-c-class/327332 "2015-08-01T23:13:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_5d61bb2c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5d61bb2c](https://forums.unrealengine.com/u/anonymous_user_5d61bb2c)\
**Post date:** [August 1, 2015, 11:13pm UTC](https://forums.unrealengine.com/t/use-bp-enumeration-asset-as-uproperty-in-c-class/327332/1 "2015-08-01T23:13:56Z")

</div>

Hello,

I am trying to attach a BP Enumeration asset to a custom c++ class in a way that will expose it within the editor.

However, I’m running into a lot of trouble. I’m able to attach the asset as a UEnum\*. However, it doesn’t give me the dropdown of the elements like I wanted when I place the blueprint(from the c++ class) within the editor. It only gives me the UEnum object itself.

I’d like to use a BP Enumeration over a c++ one for ease of access. I don’t need to make any changes to it within the c++ code, I just need to editable within the editor. I also want to make it an array, but I’m assuming I just have to figure this out, then put it in a TArray\<\>.

The c++ class inherits from UStaticMeshComponent. For some reason, this doesn’t let me generate a blueprint from it, so a cannot at the Enumeration there.

Here is my c++ code. It’s very basic so far:  
UGameBoard\_Tile\_SMC.h

```
#pragma once

#include "Components/StaticMeshComponent.h"
#include "GameBoard_Tile_SMC.generated.h"

UCLASS()
class STRATEGYGAMEV2_API UGameBoard_Tile_SMC : public UStaticMeshComponent
{
	GENERATED_BODY()
public:

	UGameBoard_Tile_SMC();

	UPROPERTY(EditAnywhere, Category = "TileStates")
	UEnum* TileStateEnumeration;
};

```

UGameBoard\_Tile\_SMC.cpp

```
#include "StrategyGameV2.h"
#include "GameBoard_Tile_SMC.h"

UGameBoard_Tile_SMC::UGameBoard_Tile_SMC()
{
	static ConstructorHelpers::FObjectFinder<UEnum> BPGBCResource(TEXT("Enumeration'/Game/GameBoardAssets/Blueprints/EGameBoard_TileStates'"));
	if (BPGBCResource.Object != NULL)
	{
		TileStateEnumeration = BPGBCResource.Object;
	}
}

```

ExecutionCode within constructor of a custom class derived from AActor:

```
TileMesh = LoadObject<UStaticMesh>(NULL, TEXT("/Game/GameBoardAssets/Meshes/TileFloor"), NULL, LOAD_None, NULL);

	UGameBoard_Tile_SMC* tile = CreateOptionalDefaultSubobject<UGameBoard_Tile_SMC>(TEXT("Gameboard_Test"));
	tile->SetStaticMesh(TileMesh);
	this->AddInstanceComponent(tile); 

	tilelist.Add(tile);

```

Result:

 ![52433-snip.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/e/d/5ed78edbe2ca08e8f352f944d6345aabfb157471.png)

Desired:

![52434-desired.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/5/d/65d0cf730ad94ef4ffb9707bc28e3b5baa6aa9c7.png)

If anyone can help, I would appreciate it. Again, I don’t have to use the actual enumerator within the c++. I plan I using it when I get into the blueprint development side of things.

---

<div class="post-metadata">

**Author:** ![shared\_pointer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shared\_pointer](https://forums.unrealengine.com/u/shared_pointer)\
**Post date:** [July 28, 2016, 2:00pm UTC](https://forums.unrealengine.com/t/use-bp-enumeration-asset-as-uproperty-in-c-class/327332/2 "2016-07-28T14:00:37Z")

</div>

Hi,  
I’m faced with the same problem, did you find out how to do it?  
Thanks
