Ver 4.4.1. I’m trying to attach a particle system to an Actor, but am failing at the first hurdle.
.h:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Projectile)
TSubobjectPtr<UParticleSystemComponent> PSystem;
.cpp:
#include "ParticleDefinitions.h"
.
.
.
PSystem = PCIP.CreateDefaultSubobject<UParticleSystemComponent>(this, TEXT("Particles"));
.
.
.
On Compile I get:
Error 1 error C2440: 'initializing' : cannot convert from 'UParticleSystemComponent *' to 'UObject *' e:\ue4\unreal engine\4.4\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h 569 1 ReconOne
Error 2 error C2439: 'TSubobjectPtrConstructor<UParticleSystemComponent>::Object' : member could not be initialized e:\ue4\unreal engine\4.4\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h 569 1 ReconOne
Now, I’ve done lots of searching on this error. Seems to be a common issue, however the solution I always see is to include ‘ParticleDefinitions.h’. I do this, but it doesn’t seem to fix it for me?
Anyone got any ideas what else it could be?