C++ Reference to an Actor in the Scene

I think you over complicating things, UE4 is not as component centric as Unity. Your actor is a class on it own and it self contains the code and should have perticical function and role, components in UE4 are more like a add-on that you can add to actor, like mesh render, sound player, primery things that defines physicallity of the actor rether then function if you look on components, but in deed you can extra add function via components too.

Considering you want to make teleporter, i don’t think you will make few versions of teleporters and even if you can always reuse the code just by class inherence by making actors based of your teleporter actor just with extra components change it’s appereance (note that Blueprint is also a class same as C++ class). By making simple teleprotation actor it should be easier to operate and all you need to do is set target actor via simple pointer ,ATeleporter* for example or any actor (AActor*) can be target as all actors have location (if they have root component that have location), even if you make teleporter component using actor (AActor*) as a target is better solution.

Even if you make component you will probably end up making Teleporter actor sicne you need actor that contains your component in order to place it on the level, this is what happens with most components like UCameraComponent have ACameraActor ir UAudioComponent have AAmbientSound and all of them forward interface of component in to actor.

I have feeling you don’t know how actor classes work in UE4, watch my tutorial its about classes and objects that i made because in the past lot of people didn’t understood basics concepts of it, it not really targeting your issue but it shows how actor classes are reusable just by inherence without need of making components (in matter of fact in early versions of UE4 you could not make component classes in blueprints):

2621s