An enum to represent your game’s valid teams to use with Perception Detection by Affiliation

UENUM()
enum class EMyTeamId : uint8
{
	TeamA,
	TeamB
}

This makes it easier to manage which team an actor belongs to for example when configuring it in the editor.

To use this you just need to use static_cast:

UPROPERTY()
EMyTeamId MyTeam;
 
 
uint8 GetGenericTeamId() const
{
	return static_cast<uint8>(MyTeam);
}