# Cannot place variable X in external scope Y

**URL:** <https://forums.unrealengine.com/t/cannot-place-variable-x-in-external-scope-y/309972>\
**Category:** Editor Scripting\
**Tags:** Variable, scope, unreal-engine, question\
**Created:** [March 8, 2015, 3:58pm UTC](https://forums.unrealengine.com/t/cannot-place-variable-x-in-external-scope-y/309972 "2015-03-08T15:58:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZoltanE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZoltanE](https://forums.unrealengine.com/u/ZoltanE)\
**Post date:** [March 8, 2015, 3:58pm UTC](https://forums.unrealengine.com/t/cannot-place-variable-x-in-external-scope-y/309972/1 "2015-03-08T15:58:04Z")

</div>

I haven’t worked with Blueprints for the last couple of months so now I’m catching up with the new features. One apparent change is that I can’t reference anymore an inherited component (originally added in the parent class): dragging it to the even graph shows the _“Cannot place variable X in external scope Y”_ message.  
Why does this happen? Should I create getter/modifier functions in the parent for each component?

EDIT: Binary 4.7.2

---

<div class="post-metadata">

**Author:** ![ZoltanE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZoltanE](https://forums.unrealengine.com/u/ZoltanE)\
**Post date:** [March 8, 2015, 4:10pm UTC](https://forums.unrealengine.com/t/cannot-place-variable-x-in-external-scope-y/309972/2 "2015-03-08T16:10:00Z")

</div>

Ah, so in the context sensitive right click menu I have component specific versions of functions I wanted to use.

---

<div class="post-metadata">

**Author:** ![ZoltanE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZoltanE](https://forums.unrealengine.com/u/ZoltanE)\
**Post date:** [March 17, 2015, 3:00pm UTC](https://forums.unrealengine.com/t/cannot-place-variable-x-in-external-scope-y/309972/3 "2015-03-17T15:00:34Z")

</div>

I don’t know why those component specific functions there but they break when I rename the component so I stopped using them. Therefore I would still like to know why I can’t get a reference to a component in a parent class.

---

<div class="post-metadata">

**Author:** ![Envisioner](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Envisioner](https://forums.unrealengine.com/u/Envisioner)\
**Post date:** [July 19, 2015, 5:04pm UTC](https://forums.unrealengine.com/t/cannot-place-variable-x-in-external-scope-y/309972/4 "2015-07-19T17:04:45Z")

</div>

I would also like to know why this is still present. If I call the “component-specific version” of a function, it creates a getter node for that component anyway, so why are we then also denied the ability to directly drag and drop these components from the Component panel. It doesn’t make any sense…

---

<div class="post-metadata">

**Author:** ![davek](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@davek](https://forums.unrealengine.com/u/davek)\
**Post date:** [August 22, 2015, 9:46am UTC](https://forums.unrealengine.com/t/cannot-place-variable-x-in-external-scope-y/309972/5 "2015-08-22T09:46:52Z")

</div>

Simply drag the component into EventGraph from the Components section of the Variables UI group rather than the more obvious component tree above it. That worked for me, even in 4.8.3.
