This part I get it. In order to get the tank class, first I need to create a pointer pointing to Tank class in game mode.h, and then store the tank class in the pointer by using GameplayStatics::GetPlayerPawn(). . Therefore, I can acess the HandleDestruction() function in that class.
But this part I don’t get it and the system is also prventing me from compiling. Why don’t I need to repeat the process before? Why can I cast to Tower class from (DeadActor)? I think there is nothing in DeadActor class.
If that’s OK, why can’t I cast to Tank the same way like this?