Created
March 22, 2014 09:54
-
-
Save jmoyers/9703970 to your computer and use it in GitHub Desktop.
Blueprint integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved. | |
#include "TestUnrealCodeProject.h" | |
#include "ProximityLight.h" | |
AProximityLight::AProximityLight(const class FPostConstructInitializeProperties& PCIP) | |
: Super(PCIP) | |
{ | |
PointLight = PCIP.CreateDefaultSubobject<UPointLightComponent>(this, "PointLight"); | |
PointLight->SetBrightness(1000.0f); | |
PointLight->bVisible = true; | |
RootComponent = PointLight; | |
SphereTrigger = PCIP.CreateDefaultSubobject<USphereComponent>(this, "SphereTrigger"); | |
SphereTrigger->InitSphereRadius(250.0f); | |
SphereTrigger->AttachParent = RootComponent; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved. | |
#pragma once | |
#include "GameFramework/Actor.h" | |
#include "ProximityLight.generated.h" | |
/** | |
* | |
*/ | |
UCLASS() | |
class AProximityLight : public AActor | |
{ | |
GENERATED_UCLASS_BODY() | |
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Proximity Light Components") | |
TSubobjectPtr<UPointLightComponent> PointLight; | |
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Proximity Light Components") | |
TSubobjectPtr<USphereComponent> SphereTrigger; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment