# Adding Meta to Blueprint Variables

**URL:** <https://forums.unrealengine.com/t/adding-meta-to-blueprint-variables/406761>\
**Category:** Blueprint\
**Tags:** properties, unreal-engine, editor, UE4, question, Blueprint\
**Created:** [October 11, 2017, 5:04pm UTC](https://forums.unrealengine.com/t/adding-meta-to-blueprint-variables/406761 "2017-10-11T17:04:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![calembendell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@calembendell](https://forums.unrealengine.com/u/calembendell)\
**Post date:** [October 11, 2017, 5:04pm UTC](https://forums.unrealengine.com/t/adding-meta-to-blueprint-variables/406761/1 "2017-10-11T17:04:28Z")

</div>

Hey guys,

Is it possible to add properties to Blueprint variables _in the editor_?  
I want to add a flag that indicates whether a value should be database serialised and another flag that indicates if a value should be included in debugging information, but so far it’s been elusive to add meta properties!

Cheers,  
Calem

---

<div class="post-metadata">

**Author:** ![c4tnt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@c4tnt](https://forums.unrealengine.com/u/c4tnt)\
**Post date:** [October 11, 2017, 5:33pm UTC](https://forums.unrealengine.com/t/adding-meta-to-blueprint-variables/406761/2 "2017-10-11T17:33:34Z")

</div>

Hi! You can use custom metadata with functions, classes and properties till you using C++ code. To use this you have to add your custom meta directly to UCLASS\UPROPERTY\UFUNCTION Meta block

```
UPROPERY(Meta="MyCustomMeta=100500")

```

This meta value will be attached to the property and you will be able to get it using UProperty::GetMeta or check presence of a meta flag using UProperty::HasMeta. To extract meta from object instance you can use GetClass() first. It will give you a reference to the Class object associated with your c++ class. This object contains functions like FindProperty, which allow to find a property by it’s name. If you get UProperty reference somehow it’s easy to get an associated meta - UProperty references contain GetMeta function.

```
UClass* CheckClass = SomeUObject.GetClass();
UProperty* CheckProperty = CheckClass.FindProperty(TEXT("SomeProperty"));
FString CustomMeta = CheckProperty.GetMeta(TEXT("CustomMeta"));
```

---

<div class="post-metadata">

**Author:** ![calembendell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@calembendell](https://forums.unrealengine.com/u/calembendell)\
**Post date:** [October 12, 2017, 3:14pm UTC](https://forums.unrealengine.com/t/adding-meta-to-blueprint-variables/406761/3 "2017-10-12T15:14:08Z")

</div>

thanks for the answer! i’ve clarified my question a bit since i realised i only put `editor` in the tags. do you know if it’s possible to add meta to properties that are variables in blueprints in the editor?

---

<div class="post-metadata">

**Author:** ![c4tnt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@c4tnt](https://forums.unrealengine.com/u/c4tnt)\
**Post date:** [October 12, 2017, 4:11pm UTC](https://forums.unrealengine.com/t/adding-meta-to-blueprint-variables/406761/4 "2017-10-12T16:11:39Z")

</div>

Unfortunately I have no idea how to use custom meta without c++. If you don’t have a c++ based module in your project I even have no idea how do you want to make a custom serialization. (There is no exposed to the blueprint serializers as I know). If you have a c++ module but just want to mark fields directly from the blueprint editor you can use blueprint details modifiers. They affects all blueprints but they should be registered from the c++ code too.

```
	// Register Blueprint editor variable customization
	FBlueprintEditorModule& BlueprintEditorModule = FModuleManager::LoadModuleChecked<FBlueprintEditorModule>("Kismet");
	BlueprintEditorModule.RegisterVariableCustomization(UProperty::StaticClass(), FOnGetVariableCustomizationInstance::CreateStatic(&FControlRigVariableDetailsCustomization::MakeInstance));

```

Example of how it works you can find in the engine sources: UE\_4.17\Engine\Plugins\Experimental\ControlRig\Source\ControlRigEditor\Private\ControlRigVariableDetailsCustomization.cpp

This modifier adds some extra checkers for some variables and extends meta like you want to do.

---

<div class="post-metadata">

**Author:** ![calembendell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@calembendell](https://forums.unrealengine.com/u/calembendell)\
**Post date:** [October 19, 2017, 4:12pm UTC](https://forums.unrealengine.com/t/adding-meta-to-blueprint-variables/406761/5 "2017-10-19T16:12:38Z")

</div>

Doesn’t seem to be possible right now.

Edit: asking this elsewhere, hoping for updates soon!
