Why does this cause the child blueprint to crash only when editting the blueprint?

Pretty self explanatory. This class code compiles fine. It lets me create a child blueprint. Let’s me put that in the world, just like it’s suppose to. But if I try to actually edit the child blueprint or PIE, insta-crash.


class MYSAGA_API AAtmosphere : public AActor
	/* Methods created by the engine.  Basic functionality.  DO NOT DELETE WITHOUT COMMENTING WHY*/
	virtual void BeginPlay() override;
	virtual void Tick( float DeltaSeconds ) override;

	/* These are the primary components of the Atmosphere class 
	 * They are initialized in the constructor before beginning play */
	UPROPERTY(BlueprintReadOnly) UDirectionalLightComponent* WorldLight = nullptr;
	UPROPERTY(BlueprintReadOnly) UAtmosphericFogComponent* AtmosphereFog = nullptr;
	UPROPERTY(BlueprintReadOnly) UExponentialHeightFogComponent* HeightFog = nullptr;
	UPROPERTY(BlueprintReadOnly) AAmbientSound* AmbientSound = nullptr;



// Sets default values
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = false;

	// Attaches all appropriate components for creating and controlling the game atmosphere.
	UDirectionalLightComponent* WorldLight = CreateDefaultSubobject<UDirectionalLightComponent>(FName(TEXT("World Light")));
	UAtmosphericFogComponent* AtmosphereFog = CreateDefaultSubobject<UAtmosphericFogComponent>(FName(TEXT("Atmosphere Fog")));
	UExponentialHeightFogComponent* HeightFog = CreateDefaultSubobject<UExponentialHeightFogComponent>(FName(TEXT("Height Fog")));
	AAmbientSound* AmbientSound = CreateDefaultSubobject<AAmbientSound>(FName(TEXT("Ambient Sound")));


Again, this compiles, and I can successfully put a blueprint of this class into my world… It just won’t let me open the blueprint or run the world…

OMG… nevermind. I see that when i copy/pasted I forgot to remove the declaration portion…

My apologies for wasting your all’s time :slight_smile:

MODERATOR: Please feel free to close or delete this, as it serves no purpose.