# Create Blueprint class and use UGameplayStatics

**URL:** <https://forums.unrealengine.com/t/create-blueprint-class-and-use-ugameplaystatics/403688>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [September 4, 2017, 10:41am UTC](https://forums.unrealengine.com/t/create-blueprint-class-and-use-ugameplaystatics/403688 "2017-09-04T10:41:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_3f422bcf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3f422bcf](https://forums.unrealengine.com/u/anonymous_user_3f422bcf)\
**Post date:** [September 4, 2017, 10:41am UTC](https://forums.unrealengine.com/t/create-blueprint-class-and-use-ugameplaystatics/403688/1 "2017-09-04T10:41:55Z")

</div>

I need to create a new Blueprint class, by extending UObject. The only thing is that inside a UObject I can’t use functions from UGameplayStatics (e.g. getAllActorsOfClass). In order to use these functions I need to extend other classes such as Actor or ActorComponent, but I don’t want to extend them (I need an object, not an Actor or a Component).

Is there a way to use the UGameplayStatics functions by extending an Object?

---

<div class="post-metadata">

**Author:** ![BenVlodgi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benvlodgi/32/1194567_2.png) [@BenVlodgi](https://forums.unrealengine.com/u/BenVlodgi)\
**Post date:** [September 4, 2017, 6:17pm UTC](https://forums.unrealengine.com/t/create-blueprint-class-and-use-ugameplaystatics/403688/2 "2017-09-04T18:17:49Z")

</div>

Perhaps you could try making a C++ class that has

```
#include "Kismet/GameplayStatics.h"

```

Perhaps then if you extend it in BP, you’d be able to use those functions.

Or put any code that requires `GetAllActorsOfClass` in your `GameMode`, and populate the UObject when you create it.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3f422bcf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3f422bcf](https://forums.unrealengine.com/u/anonymous_user_3f422bcf)\
**Post date:** [September 5, 2017, 8:21am UTC](https://forums.unrealengine.com/t/create-blueprint-class-and-use-ugameplaystatics/403688/3 "2017-09-05T08:21:34Z")

</div>

The way is not so intuitive.

To know how to do it look at the answer of @VictorRachels to [this](https://answers.unrealengine.com/questions/232711/gameplay-statics-functions-not-visible-in-blueprin.html) question and my comment to their answer.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3f422bcf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3f422bcf](https://forums.unrealengine.com/u/anonymous_user_3f422bcf)\
**Post date:** [September 5, 2017, 8:22am UTC](https://forums.unrealengine.com/t/create-blueprint-class-and-use-ugameplaystatics/403688/4 "2017-09-05T08:22:54Z")

</div>

Thanks for the hint, unfortunately it’s not so easy. I found how to do it (look at my answer) and it is just a little bit longer.

---

<div class="post-metadata">

**Author:** ![BenVlodgi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benvlodgi/32/1194567_2.png) [@BenVlodgi](https://forums.unrealengine.com/u/BenVlodgi)\
**Post date:** [September 5, 2017, 4:18pm UTC](https://forums.unrealengine.com/t/create-blueprint-class-and-use-ugameplaystatics/403688/5 "2017-09-05T16:18:32Z")

</div>

Ah, good to see an answer to this.

---

<div class="post-metadata">

**Author:** ![Guardbrawl](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Guardbrawl](https://forums.unrealengine.com/u/Guardbrawl)\
**Post date:** [January 16, 2026, 3:38pm UTC](https://forums.unrealengine.com/t/create-blueprint-class-and-use-ugameplaystatics/403688/6 "2026-01-16T15:38:34Z")

</div>

Tried the link on the answer, and thanks to the person that pointed out there was one. Though, the link wasn’t working for me, so just in case that was happening for anyone else, here’s the link to a solution that worked for me, potentially the same one:[**525776**](https://forums.unrealengine.com/t/gameplay-statics-functions-not-visible-in-blueprint/319602)
