# Convert BlackboardKeySelector to Object

**URL:** <https://forums.unrealengine.com/t/convert-blackboardkeyselector-to-object/401995>\
**Category:** AI\
**Tags:** Behavior-Tree, blackboard, unreal-engine, UE4, CPP, question\
**Created:** [August 15, 2017, 4:31pm UTC](https://forums.unrealengine.com/t/convert-blackboardkeyselector-to-object/401995 "2017-08-15T16:31:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_05126ce8](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_05126ce8](https://forums.unrealengine.com/u/anonymous_user_05126ce8)\
**Post date:** [August 15, 2017, 4:31pm UTC](https://forums.unrealengine.com/t/convert-blackboardkeyselector-to-object/401995/1 "2017-08-15T16:31:58Z")

</div>

![193641-screenshot_1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/a/c/dac6912e3569aeec7c9b180fecb2dfcd6dfd661b.png)

Guys Im trying to convert this peace of blueprint code to c++. I have already tried casting but VS throws me compilation error. I searched in google and documentation nearly for 4 hours, but I couldn’t find anything helpful, so this is my last hope

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [September 25, 2023, 3:41am UTC](https://forums.unrealengine.com/t/convert-blackboardkeyselector-to-object/401995/2 "2023-09-25T03:41:43Z")

</div>

`const UObject* Object = BlackboardComponent->GetValueAsObject( BlackboardKey.SelectedKeyName );`
