# How do I attach expose a tooltip to a basic variable in code c++

**URL:** <https://forums.unrealengine.com/t/how-do-i-attach-expose-a-tooltip-to-a-basic-variable-in-code-c/298930>\
**Category:** UI\
**Tags:** tooltips, unreal-engine, question, CPP\
**Created:** [November 14, 2014, 2:48pm UTC](https://forums.unrealengine.com/t/how-do-i-attach-expose-a-tooltip-to-a-basic-variable-in-code-c/298930 "2014-11-14T14:48:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TinyTeaTree\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TinyTeaTree\_1](https://forums.unrealengine.com/u/TinyTeaTree_1)\
**Post date:** [November 14, 2014, 2:48pm UTC](https://forums.unrealengine.com/t/how-do-i-attach-expose-a-tooltip-to-a-basic-variable-in-code-c/298930/1 "2014-11-14T14:48:58Z")

</div>

Title said it all.

I want a tooltip to appear in the editor when hovering over it with a mouse. The variable to set is declared in code.

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [November 14, 2014, 4:52pm UTC](https://forums.unrealengine.com/t/how-do-i-attach-expose-a-tooltip-to-a-basic-variable-in-code-c/298930/2 "2014-11-14T16:52:55Z")

</div>

#Wiki

Creating variables in C++ for use in BP / Editor

> **[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...

Rama

---

<div class="post-metadata">

**Author:** ![TinyTeaTree\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TinyTeaTree\_1](https://forums.unrealengine.com/u/TinyTeaTree_1)\
**Post date:** [November 14, 2014, 5:37pm UTC](https://forums.unrealengine.com/t/how-do-i-attach-expose-a-tooltip-to-a-basic-variable-in-code-c/298930/3 "2014-11-14T17:37:35Z")

</div>

Cool, correct answer. I searched over all google and couldn’t find it I hope this question pops up to peoples searches

btw If you could add to your answer that …

/\*\* What is the Player’s current musical skill level? \*/  
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=PlayerMusicSkill)  
int32 MusicSkillLevel;

it is the commets that become tooltips that would be great and

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1abd888f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1abd888f](https://forums.unrealengine.com/u/anonymous_user_1abd888f)\
**Post date:** [October 8, 2015, 2:34pm UTC](https://forums.unrealengine.com/t/how-do-i-attach-expose-a-tooltip-to-a-basic-variable-in-code-c/298930/4 "2015-10-08T14:34:33Z")

</div>

This should work:

```
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=PlayerMusicSkill, meta = (ToolTip = "What is the Player's current musical skill level?"))
int32 MusicSkillLevel;

```

---

<div class="post-metadata">

**Author:** ![Stollie69](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stollie69](https://forums.unrealengine.com/u/Stollie69)\
**Post date:** [February 15, 2019, 7:54am UTC](https://forums.unrealengine.com/t/how-do-i-attach-expose-a-tooltip-to-a-basic-variable-in-code-c/298930/5 "2019-02-15T07:54:06Z")

</div>

Tried out both of the suggested solutions in 4.21.2 on two different variables for anyone else who lands here - either works 🙂
