# get reference to variable in blueprint funcion return?

**URL:** <https://forums.unrealengine.com/t/get-reference-to-variable-in-blueprint-funcion-return/415324>\
**Category:** Editor Scripting\
**Tags:** reference, unreal-engine, UE4, CPP, Blueprint, question\
**Created:** [January 23, 2018, 7:49am UTC](https://forums.unrealengine.com/t/get-reference-to-variable-in-blueprint-funcion-return/415324 "2018-01-23T07:49:02Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![anonymous\_user\_49a519741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49a519741](https://forums.unrealengine.com/u/anonymous_user_49a519741)\
**Post date:** [January 23, 2018, 4:53pm UTC](https://forums.unrealengine.com/t/get-reference-to-variable-in-blueprint-funcion-return/415324/3 "2018-01-23T16:53:37Z")

</div>

If your answer to my question (above) is “Yes”, here’s the information you require:

> **[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 — https://unrealcommunity.wiki/! You will be able to find content from...

Update:

If you want C++ to return a value to blueprints then you just want to use the BlueprintCallable specifier.

Returning a reference is done by using standard C++ syntax (the ‘&’ token). You can search the web for more info on C++ references.

Still shaky on what you want, but if all you want to do is implement a variable in BP and the C++ base class has access to it then you should just use UPROPERTY with the appropriate (i.e. BlueprintXXX) specifier(s). You declare it in C++ and assign it the reference to an object from within the BP.

---

_[View the full topic](https://forums.unrealengine.com/t/get-reference-to-variable-in-blueprint-funcion-return/415324)._
