I have and I don’t think it’s a bug with the engine. I think it has to do with the FActorSpawnParameters.
Can you try the following and see what happens?
AActor* UTFunctionLibrary::SpawnFromTemplate( AActor *Template, FTransform Location, ESpawnActorCollisionHandlingMethod aCollisionHandling /*= ESpawnActorCollisionHandlingMethod::AlwaysSpawn */ )
{
if( Template )
{
FActorSpawnParameters Params;
Params.SpawnCollisionHandlingOverride = aCollisionHandling;
const FVector Loc = Location.GetLocation( );
const FRotator Rot = Location.GetRotation( ).Rotator( );
return Template->GetWorld( )->SpawnActor( Template->GetClass( ), &Loc, &Rot, Params );
}
return nullptr;
}
Thanks.