# Instantiating Blueprint-based components in C++

**URL:** <https://forums.unrealengine.com/t/instantiating-blueprint-based-components-in-c/369836>\
**Category:** Blueprint\
**Tags:** tsubclassof, unreal-engine, component, question\
**Created:** [September 8, 2016, 6:07pm UTC](https://forums.unrealengine.com/t/instantiating-blueprint-based-components-in-c/369836 "2016-09-08T18:07:44Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Teiwaz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Teiwaz](https://forums.unrealengine.com/u/Teiwaz)\
**Post date:** [September 16, 2016, 8:30pm UTC](https://forums.unrealengine.com/t/instantiating-blueprint-based-components-in-c/369836/7 "2016-09-16T20:30:29Z")

</div>

Tim Lincoln solved this problem in another issue, here:

> **[GEngine\* is null when actors instantiate during editor startup?](https://forums.unrealengine.com/questions/486936/gengine-is-null-when-actors-instantiate-during-edi.html)**
>
> I need access to my global data singleton (GEngine-\>GameSingleton) in the constructors for several of my actor types. However, while the editor is loading, it appears that the actors are running their constructors (For their content browser...

In short:  
Build references to the BP classes using TSubtypeOf in a game data singleton.  
Then access the game data singleton via a path reference using FObjectFinder. (Can’t use the GEngine pointer to get it because it’s null.)

---

_[View the full topic](https://forums.unrealengine.com/t/instantiating-blueprint-based-components-in-c/369836)._
