ABoxReflectionCapture::ABoxReflectionCapture(const class FPostConstructInitializeProperties& PCIP) : Super(PCIP.SetDefaultSubobjectClass<UBoxReflectionCaptureComponent>(TEXT("NewReflectionComponent"))) { UBoxReflectionCaptureComponent* BoxComponent = CastChecked<UBoxReflectionCaptureComponent>(CaptureComponent); BoxComponent->RelativeScale3D = FVector(1000, 1000, 400); RootComponent = BoxComponent; #if WITH_EDITORONLY_DATA if (SpriteComponent) { SpriteComponent->AttachParent = BoxComponent; } #endif //WITH_EDITORONLY_DATA TSubobjectPtr<UBoxComponent> DrawInfluenceBox = PCIP.CreateDefaultSubobject<UBoxComponent>(this, TEXT("DrawBox0")); DrawInfluenceBox->AttachParent = CaptureComponent; DrawInfluenceBox->bDrawOnlyIfSelected = true; DrawInfluenceBox->bUseEditorCompositing = true; DrawInfluenceBox->BodyInstance.bEnableCollision_DEPRECATED = false; DrawInfluenceBox->SetCollisionProfileName(UCollisionProfile::NoCollision_ProfileName); DrawInfluenceBox->InitBoxExtent(FVector(1, 1, 1)); BoxComponent->PreviewInfluenceBox = DrawInfluenceBox; TSubobjectPtr<UBoxComponent> DrawCaptureBox = PCIP.CreateDefaultSubobject<UBoxComponent>(this, TEXT("DrawBox1")); DrawCaptureBox->AttachParent = CaptureComponent; DrawCaptureBox->bDrawOnlyIfSelected = true; DrawCaptureBox->bUseEditorCompositing = true; DrawCaptureBox->BodyInstance.bEnableCollision_DEPRECATED = false; DrawCaptureBox->SetCollisionProfileName(UCollisionProfile::NoCollision_ProfileName); DrawCaptureBox->ShapeColor = FColor(100, 90, 40); DrawCaptureBox->InitBoxExtent(FVector(1, 1, 1)); BoxComponent->PreviewCaptureBox = DrawCaptureBox; }
ALevelBounds::ALevelBounds(const class FPostConstructInitializeProperties& PCIP) : Super(PCIP) { TSubobjectPtr<UBoxComponent> BoxComponent = PCIP.CreateDefaultSubobject<UBoxComponent>(this, TEXT("BoxComponent0")); RootComponent = BoxComponent; RootComponent->Mobility = EComponentMobility::Static; RootComponent->RelativeScale3D = DefaultLevelSize; bAutoUpdateBounds = true; BoxComponent->bDrawOnlyIfSelected = true; BoxComponent->bUseAttachParentBound = false; BoxComponent->bUseEditorCompositing = true; BoxComponent->BodyInstance.bEnableCollision_DEPRECATED = false; BoxComponent->SetCollisionProfileName(UCollisionProfile::NoCollision_ProfileName); BoxComponent->InitBoxExtent(FVector(0.5f, 0.5f, 0.5f)); bCanBeDamaged = false; #if WITH_EDITOR bLevelBoundsDirty = true; bSubscribedToEvents = false; bUsingDefaultBounds = false; #endif }