4.7.6 or 4.8 PREVIEW 4
I’m not sure why this simple component is invisible on the PIE (begin play) It is just an arrow component that is constructed. It is visible in PIE but when I play it is not.
HEADER FILE
UCLASS()
class CODEPROJECT_API ARoom : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
ARoom(const FObjectInitializer& ObjectInitializer);
};
CPP FILE
// Sets default values
ARoom::ARoom(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = false;
auto arrow = ObjectInitializer.CreateDefaultSubobject<UArrowComponent>(this, TEXT("Arrow"));
arrow->ArrowColor = FColor(255, 255, 255);
arrow->SetHiddenInGame(false);
SetRootComponent(arrow);
}