# \[4.25\] Have Pawns inherit from an enriched Actor class

**URL:** <https://forums.unrealengine.com/t/4-25-have-pawns-inherit-from-an-enriched-actor-class/1760288>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [March 18, 2024, 12:09pm UTC](https://forums.unrealengine.com/t/4-25-have-pawns-inherit-from-an-enriched-actor-class/1760288 "2024-03-18T12:09:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DehoEdeba](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dehoedeba/32/88710_2.png) [@DehoEdeba](https://forums.unrealengine.com/u/DehoEdeba)\
**Post date:** [March 18, 2024, 12:09pm UTC](https://forums.unrealengine.com/t/4-25-have-pawns-inherit-from-an-enriched-actor-class/1760288/1 "2024-03-18T12:09:09Z")

</div>

Hello everyone,

I’ve been trying to expose the Gameplay Tag Asset Interface in all my actors’ blueprints since I’m not a C++ developer, and I’m _almost_ there but turns out there’s a final boss of a problem that I can’t seem to solve.

**WHAT I’VE ALREADY DONE :**

1. I followed [this very helpful comment](https://forums.unrealengine.com/t/why-the-heck-is-igameplaytagassetinterface-not-exposed-to-blueprints/99819/3) and created a C++ class called “ActorEnriched” and added these tidbits in ActorEnriched.h :

```auto
#include "GameplayTagAssetInterface.h"
class AFooCharacter : public ACharacter, public IGameplayTagAssetInterface

```

```auto
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameplayTags")
FGameplayTagContainer GameplayTags;

virtual void GetOwnedGameplayTags(FGameplayTagContainer& TagContainer) const override { TagContainer = GameplayTags; return; }

```

Also this in my build.cs:

```auto
PublicDependencyModuleNames.AddRange(new string]{ "Core", ...., " **GameplayTags**" });

```

1. I followed [this excellent tutorial](https://towardsdev.com/how-to-override-engine-classes-of-the-actors-instances-in-levels-without-modifying-the-ue-engine-a11397a71bf7) in order to “CoreRedirect” all my actor class references to the new “ActorEnriched” class by adding this in DefaultEngine.ini :

```auto
[CoreRedirects]
+ClassRedirects=(OldName="/Script/Engine.SkeletalMeshActor",NewName="/Script/MyProject.MySkeletalMeshActor",InstanceOnly=false)

```

**RESULT :**  
it does work for all my actors which directly inherit from the “Actor” class, they now all inherit from my “ActorEnriched” class. Hence I could see the gameplay tags were exposed, and I was thrilled.

**PROBLEM :**  
it did not change anything for my Pawns, nor my StaticMeshActors, etc… basically anything that doesn’t have as a direct parent “Actor” has not been impacted. They don’t have the Gameplay tags exposed. I hoped they would because after all Pawns inherit from Actors, but they still reference the “old” Actor class apparently nothing was redirected there.

I guess I could create a “PawnEnriched” class, a “StaticMeshActorEnriched” class, etc, and add new redirectors, but that sounds like it wouldn’t be clean.  
I guess I could directly modify the engine Actor class but that sounds dangerous and not good practice (unless it is?)

**QUESTION :**  
is there a clean way I could make my Pawn (or StaticMeshActor, etc) inherit from “ActorEnriched” instead of the default Actor class ?

Thanks in advance for your help ! If it ends up being too much of an ordeal I’ll probably revert back all my changes and either use a dumbed down version of gameplay tags (using Blueprint interfaces) or drop it altogether since my project is already well advanced and worked fine before.

---

<div class="post-metadata">

**Author:** ![DehoEdeba](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dehoedeba/32/88710_2.png) [@DehoEdeba](https://forums.unrealengine.com/u/DehoEdeba)\
**Post date:** [March 20, 2024, 2:22pm UTC](https://forums.unrealengine.com/t/4-25-have-pawns-inherit-from-an-enriched-actor-class/1760288/2 "2024-03-20T14:22:34Z")

</div>

Welp, I ended abandoning that idea since it would have just been a “nice to have” feature in my case and I couldn’t find any way to have it working without taking the risk of breaking fundamental things. Too bad, but let’s move on!
