# using Rama's custom GameInstance in other object than actors...?

**URL:** <https://forums.unrealengine.com/t/using-ramas-custom-gameinstance-in-other-object-than-actors/63509>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [May 11, 2016, 12:20am UTC](https://forums.unrealengine.com/t/using-ramas-custom-gameinstance-in-other-object-than-actors/63509 "2016-05-11T00:20:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon65365138](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon65365138](https://forums.unrealengine.com/u/anon65365138)\
**Post date:** [May 11, 2016, 12:20am UTC](https://forums.unrealengine.com/t/using-ramas-custom-gameinstance-in-other-object-than-actors/63509/1 "2016-05-11T00:20:16Z")

</div>

> **[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...

It was good info.

There is new problem for myself that When I have to use it other than Actor, such as Actor Component, is it even possible?

I start to run out of ideas how to do it…

---

<div class="post-metadata">

**Author:** ![GeekyPayback](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GeekyPayback](https://forums.unrealengine.com/u/GeekyPayback)\
**Post date:** [May 11, 2016, 10:50pm UTC](https://forums.unrealengine.com/t/using-ramas-custom-gameinstance-in-other-object-than-actors/63509/2 "2016-05-11T22:50:30Z")

</div>

This should work anywhere that GEngine exists, should work from the component

```auto

GEngine->GetWorld()->GetGameInstance();

```

nb. This [answer](https://answers.unrealengine.com/questions/299812/get-game-instance-outside-of-aactor.html) is the first hit on google when you search for “ue4 getgameinstance outside actor”

---

<div class="post-metadata">

**Author:** ![anon65365138](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon65365138](https://forums.unrealengine.com/u/anon65365138)\
**Post date:** [May 11, 2016, 11:54pm UTC](https://forums.unrealengine.com/t/using-ramas-custom-gameinstance-in-other-object-than-actors/63509/3 "2016-05-11T23:54:28Z")

</div>

> [@GeekyPayback;528544](#):
>
> This should work anywhere that GEngine exists, should work from the component
> 
> ```auto
> 
> GEngine->GetWorld()->GetGameInstance();
> 
> ```
> 
> nb. This [answer](https://answers.unrealengine.com/questions/299812/get-game-instance-outside-of-aactor.html) is the first hit on google when you search for “ue4 getgameinstance outside actor”

OMG how silly of me. I didn’t know how to google with proper key word. Thank you so much. You saved my poor soul T.T

---

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [May 12, 2016, 10:35am UTC](https://forums.unrealengine.com/t/using-ramas-custom-gameinstance-in-other-object-than-actors/63509/4 "2016-05-12T10:35:11Z")

</div>

UGameplayStatics::GetGameInstance(this);

^ Also works in BP.
