Download

Reduce component tick frequency

Hello,
I have a question for you:
How can I reduce a component tick frequency of a Controller? Example:

CharacterController.h




	UPROPERTY(transient)
		UBehaviorTreeComponent* BehaviorComp;



CharacterController.cpp




ACharacterController::ACharacterController()
{
     BehaviorComp =	 CreateDefaultSubobject<UBehaviorTreeComponent>(TEXT("BehaviorComp"));
}

void ACharacterController::Possess(class APawn *InPawn)
{
	Super::Possess(InPawn);
        ACharacter* character = Cast<ACharacter>(InPawn);
        if (character && character->CharacterBehavior)
        {
              BehaviorComp->StartTree(*character->CharacterBehavior);
              // reduce frequency tick for increase performance...
         }

}




Thanks all!

You can change TickInterval


PrimaryComponentTick.TickInterval = 1.0f