SpawnActor giving invisible Components but not in World Outliner UE-4.27

Hi All,

I’m trying to use SpawnActor like this test…

FRotator br = FRotator::ZeroRotator;
FActorSpawnParameters SpawnInfo;
SpawnInfo.SpawnCollisionHandlingOverride =
ESpawnActorCollisionHandlingMethod::AlwaysSpawn;

ARayActor * _beam = GetWorld()->SpawnActor(FVector{ 0,0,305 }, br, SpawnInfo);

The ARayActors show up on the World Outliner but never never in the camera!!! The BP shows up fine when dragged to the camera.

I’ve looked everywhere for a solution to this and NOONE has a final answer.
Y5B4A1

You’re not indicating a class here, you might be spawning the native class where you meant to spawn your BP derived class ?

Hi!

Sorry, I used…

ARayActor * _beam = GetWorld()->SpawnActor[ARayActor]

(ARayActor::StaticClass(), fv, br, SpawnInfo);

I have another Spawn that is a WayPoint actor - and it works, placing the BoxComponent where I say - and it, a Character, enters it and it functions…you just can’t see the box.

Further, in ARayActor we have in the constructor…

Root = CreateDefaultSubobject[USceneComponent](TEXT(“Root Component”));
Root->DetailMode = DM_Low;
SetRootComponent(Root);

Ray = CreateDefaultSubobjectUStaticMeshComponent;
Ray->DetailMode = DM_Low;
Ray->SetupAttachment(GetRootComponent());
Ray->SetVisibility(true);

And still the Ray, which is a CONE, in the ActorBP, refuses to show up.
Brand new install of 4.2.7.

Thanks! Y5B4A1