Hello,
this might be a small request, but I did it a **thousand times **when creating C++ classes of actors or actor components: Remove the overridden Tick()-function and add PrimaryActorTick.bStartWithTickEnabled = false; in the constructor. Also delete the comments - they are unnecessary.
90% of actors or actor components are not ticking, but they can in some cases tick. Wouldn’t this be a much better template for a newly created actor?
UCLASS()
class MYGAME_API AMyActor: public AActor
{
GENERATED_BODY()
public:
AMyActor();
protected:
virtual void BeginPlay() override;
};
#include "MyActor.h"
AMyActor::AMyActor()
{
PrimaryActorTick.bCanEverTick = true;
PrimaryActorTick.bStartWithTickEnabled = false;
}
void AMyActor::BeginPlay()
{
Super::BeginPlay();
}