Add ActorComponent to ACharacter

ALookBasedPopupsCharacter

Last thing needed it to make sure to add the InteractableManager component to the character class

.h

// ALookBasedPopupsCharacter.h

UPROPERTY(EditDefaultsOnly)
class UZCInteractableManager* InteractableMgr = nullptr;

.cpp

AActor::AddOwnedComponent

// ALookBasedPopupsCharacter.cppc

ALookBasedPopupsCharacter::ALookBasedPopupsCharacter()
{
    //...
    InteractableMgr = CreateDefaultSubobject<UZCInteractableManager>(TEXT("InteractableManager"));
    AddOwnedComponent(InteractableMgr);
    //...
}

Last updated