Lets say my enemy class has a ton of variables linking to other classes. For example:
UPROPERTY(EditAnywhere) AWeapon* weapon; UPROPERTY(EditAnywhere) AJumpThing* jumpthing; UPROPERTY(EditAnywhere) TArray<APowerups*> powerups; etc...
If most of those will never be used on most enemies, is it still okay to leave them in the class as nullptr? Or would it be more efficient to make a second class strictly for enemies that use them?
Basically I’m not sure if they reserve memory just by existing, or if memory is only used when they actually contain objects.