FObjectFinder a Blueprint Actor Component in C++

anonymous_user_bad1c46d
Wed, 21 Oct 2015 21:11:29 +0000
Blueprint

Hello everyone,

I’m having trouble finding the correct syntax to find an Actor Component.

This Actor Component is a Blueprint “BP_HeroAC” that is a child of the C++ Class “HeroAC” .

PlayerController.h

UHeroAC* HeroActorComponent;

PlayerController.cpp

static ConstructorHelpers::FObjectFinder<UHeroAC>HeroACTemp
(TEXT("/Game/Character/BP_HeroAC.BP_HeroAC"));

HeroActorComponent = HeroACTemp.Object;

I know the path is good, but I’m not sure about the overall syntax.

Thanks

5 posts - 1 participant