I’ve run into specific issue/a bug. I’ve created a new C++ class that extends the Actor class and implements the gameplay tags interface as in this tutorial (Using GameplayTags | Shooter Tutorial). The class is called TaggedActor.
I’ve found however that I can’t use the actor class returned from most functions (like GetOverlappingActors) with my TaggedActor, which is fine, however I can’t for the life of me figure out how to convert an actor to a tagged actor. I understand that you can’t cast parents to children due to missing functionality but I can’t even seem to find how to create a child, plug in all parent values from it and fill in the gaps myself.
Moreover, I have a loop that uses an array of tagged actors that I need to add objects from an array returned by GetOverlappingActors which does some checks and (when it works) adds them to an array of TaggedActors called _actorsInSight. The problem here is that I can’t add the current loop object to the actors in sight array due to it expecting a taggedActor reference and not an actor reference, however, if I change the type of the _actorsInSight array to actor, plug it in everywhere where necessary then change the type back to taggedActor (without it unplugging itself) it magically compiles and everything works. When I restart unreal however, it breaks the links and complains it’s incompatible again.
An image might help to illustrate my problem:
The main question though, is as in the title as it would cause me to avoid this problem altogether.