Hello everyone,
I already created an actor which spawns an attached particle a few weeks ago.
However, I cannot get it working anymore and I don’t know what I am doing wrong…
The solution is probably stupidly obvious, but… yea…
Alright, so here is the example:
MyActor.h
#pragma once
#include "GameFramework/Actor.h"
#include "MyActor.generated.h"
UCLASS()
class MYGAME_API AMyActor : public AActor
{
GENERATED_BODY()
public:
AMyActor(const FObjectInitializer& ObjectInitializer);
UPROPERTY(EditDefaultsOnly)
UParticleSystem* SomeParticle;
};
MyActor.cpp
#include "MyGame.h"
#include "MyActor.h"
AMyActor::AMyActor(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
if (SomeParticle == nullptr)
{
UE_LOG(Log, Warning, TEXT("SomeParticle is a nullptr"));
}
}
I then create a blueprint based on that class and set ParticleSystem…
However - SomeParticle is always a null pointer, no matter what I try to do.
This is soo ridiculous, especially because I got this working before…
(I’m sorry if the question is too stupid…)