Major UE5 BUG - ActorComp C++ bCanEverTick behave different from UE4

I found a major bug with bug with UE5 and narrowed it to this. I made a custom C++ actorcomponent, and set PrimaryComponentTick.bCanEverTick to false in ctor. In BeginPlay, I read bCanEverTick and print to screen. In UE4, the value is correctly set, but in UE5, it is not. When PIE

Window-2023-08-31 09_29_02

UTestActorComponent::UTestActorComponent()
{
	PrimaryComponentTick.bCanEverTick = false;
}

void UTestActorComponent::BeginPlay()
{
	Super::BeginPlay();

	if (PrimaryComponentTick.bCanEverTick)
		GEngine->AddOnScreenDebugMessage (-1, 15.0f, FColor::Green, TEXT ("bCanEverTick"));
	else
		GEngine->AddOnScreenDebugMessage (-1, 15.0f, FColor::Red, TEXT ("No bCanEverTick"));
}

Repro is here. Tested on UE4.27 and UE5.2.1

https://filedn.com/l3TGy7Y83c247u0RDYa9fkp/temp/ue4/TestActorComp.zip

3 Likes