APlaneReflectionCapture::APlaneReflectionCapture(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP.SetDefaultSubobjectClass<UPlaneReflectionCaptureComponent>(TEXT("NewReflectionComponent")))
{
	UPlaneReflectionCaptureComponent* PlaneComponent = CastChecked<UPlaneReflectionCaptureComponent>(CaptureComponent);
	PlaneComponent->RelativeScale3D = FVector(1, 1000, 1000);
	RootComponent = PlaneComponent;
#if WITH_EDITORONLY_DATA
	if (SpriteComponent)
	{
		SpriteComponent->AttachParent = PlaneComponent;
	}
#endif	//#if WITH_EDITORONLY_DATA
	TSubobjectPtr<UDrawSphereComponent> DrawInfluenceRadius = PCIP.CreateDefaultSubobject<UDrawSphereComponent>(this, TEXT("DrawRadius0"));
	DrawInfluenceRadius->AttachParent = CaptureComponent;
	DrawInfluenceRadius->bDrawOnlyIfSelected = true;
	DrawInfluenceRadius->bAbsoluteScale = true;
	DrawInfluenceRadius->bUseEditorCompositing = true;
	DrawInfluenceRadius->BodyInstance.bEnableCollision_DEPRECATED = false;
	DrawInfluenceRadius->SetCollisionProfileName(UCollisionProfile::NoCollision_ProfileName);
	PlaneComponent->PreviewInfluenceRadius = DrawInfluenceRadius;

	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));
	PlaneComponent->PreviewCaptureBox = DrawCaptureBox;
}
ASphereReflectionCapture::ASphereReflectionCapture(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP.SetDefaultSubobjectClass<USphereReflectionCaptureComponent>(TEXT("NewReflectionComponent")))
{
	USphereReflectionCaptureComponent* SphereComponent = CastChecked<USphereReflectionCaptureComponent>(CaptureComponent);
	RootComponent = SphereComponent;
#if WITH_EDITORONLY_DATA
	if (SpriteComponent)
	{
		SpriteComponent->AttachParent = SphereComponent;
	}
#endif	//WITH_EDITORONLY_DATA

	TSubobjectPtr<UDrawSphereComponent> DrawInfluenceRadius = PCIP.CreateDefaultSubobject<UDrawSphereComponent>(this, TEXT("DrawRadius0"));
	DrawInfluenceRadius->AttachParent = CaptureComponent;
	DrawInfluenceRadius->bDrawOnlyIfSelected = true;
	DrawInfluenceRadius->bUseEditorCompositing = true;
	DrawInfluenceRadius->BodyInstance.bEnableCollision_DEPRECATED = false;
	DrawInfluenceRadius->SetCollisionProfileName(UCollisionProfile::NoCollision_ProfileName);
	SphereComponent->PreviewInfluenceRadius = DrawInfluenceRadius;

	DrawCaptureRadius = PCIP.CreateDefaultSubobject<UDrawSphereComponent>(this, TEXT("DrawRadius1"));
	DrawCaptureRadius->AttachParent = CaptureComponent;
	DrawCaptureRadius->bDrawOnlyIfSelected = true;
	DrawCaptureRadius->bUseEditorCompositing = true;
	DrawCaptureRadius->BodyInstance.bEnableCollision_DEPRECATED = false;
	DrawCaptureRadius->SetCollisionProfileName(UCollisionProfile::NoCollision_ProfileName);
	DrawCaptureRadius->ShapeColor = FColor(100, 90, 40);
}
Example #3
0
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
}
Example #4
0
AWorldSettings::AWorldSettings(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP.DoNotCreateDefaultSubobject(TEXT("Sprite")))
{
	// Structure to hold one-time initialization
	struct FConstructorStatics
	{
		ConstructorHelpers::FObjectFinder<UClass> DmgType_Environmental_Object;
		FConstructorStatics()
			: DmgType_Environmental_Object(TEXT("/Engine/EngineDamageTypes/DmgTypeBP_Environmental.DmgTypeBP_Environmental_C"))
		{
		}
	};
	static FConstructorStatics ConstructorStatics;

	bEnableWorldBoundsChecks = true;
	bEnableNavigationSystem = true;
	bEnableWorldComposition = false;
	bEnableWorldOriginRebasing = true;

	KillZ = -HALF_WORLD_MAX1;
	KillZDamageType = ConstructorStatics.DmgType_Environmental_Object.Object;

	WorldToMeters = 100.f;

	GameNetworkManagerClass = AGameNetworkManager::StaticClass();
	SetRemoteRoleForBackwardsCompat(ROLE_SimulatedProxy);
	bReplicates = true;
	bAlwaysRelevant = true;
	TimeDilation = 1.0f;
	MatineeTimeDilation = 1.0f;
	DemoPlayTimeDilation = 1.0f;
	PackedLightAndShadowMapTextureSize = 1024;
#if WITH_EDITORONLY_DATA
	bHiddenEd = true;
#endif // WITH_EDITORONLY_DATA

	DefaultColorScale = FVector(1.0f, 1.0f, 1.0f);

	bPlaceCellsOnlyAlongCameraTracks = false;
	VisibilityCellSize = 200;
	VisibilityAggressiveness = VIS_LeastAggressive;
	LevelLightingQuality = Quality_MAX;

	TSubobjectPtr<UStaticMeshComponent> StaticMeshComponent = PCIP.CreateDefaultSubobject<UStaticMeshComponent>(this, TEXT("StaticMeshComponent0"));
	StaticMeshComponent->bHiddenInGame = true;
	StaticMeshComponent->BodyInstance.bEnableCollision_DEPRECATED = true;
	StaticMeshComponent->SetCollisionProfileName(UCollisionProfile::BlockAll_ProfileName);
	StaticMeshComponent->PostPhysicsComponentTick.bCanEverTick = false;
	StaticMeshComponent->Mobility = EComponentMobility::Static;

	RootComponent = StaticMeshComponent;

#if WITH_EDITORONLY_DATA
	bActorLabelEditable = false;
#endif // WITH_EDITORONLY_DATA
}