Yeah, the main problem is precisely the PointerToObject
. I wouldn’t need to use casting if I could just get the pointer anyway. I need to get the pointer. And I have no idea how, because the object I want to get the pointer of does not exist in the world. It is created by another class when the game starts.
To be fair, I’ve worked with another engine and even there it’s something that just wouldn’t work like that. But I need some class code to be applied to each player character individually and without having any reference or include in the player class file itself of the class that gets reference from the player characters created during gameplay. Is this in any way possible?