#unreal

C++ services

  • Use OnBecomeRelevant and OnCeaseRelevant to determine when the node activates/deactivates
  • Important: You need to manually enable notifies for them, such as bNotifyBecomeRelevant or the functions will never run. These can be set in the constructor.

Custom descriptions

C++ nodes will not get a description by default. A simple pattern is as follows:

FString UBTService_JumpAtRandom::GetStaticDescription() const
{
	return FString::Printf(
		TEXT("%s\nJump chance: %.2f"),
		*Super::GetStaticDescription(),
		RandomJumpChance
	);
}

Override GetStaticDescription, and call its Super as part of a Printf. The super call gets the basic description, and you can add the rest after it.