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

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.


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


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

This should work:

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

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