Why we create UClass insted of AActor pointer type?
Didnt we created Projectile Class based on Actor?
Why we create UClass insted of AActor pointer type?
Didnt we created Projectile Class based on Actor?
An AActor pointer would be referencing an actual object in the world, which we don’t have. When we create a projectile, we just need to know what type of object to create, kind of like a template, and that’s what the UClass pointer provides. It might be tough to wrap around at first, but just try to understand the difference between classes and objects, which are created based on classes.