No particle related headers in external dependecies

Hello,

I am having problem with creating ParticleSystemComponent in my classes. Whenever I try to access its members I get an error:

psc_incomplete.png

When I try to navigate to ParticleSystemComponent VS sends me to line 52 of the Emitter.h. I have checked external dependecies and I am missing all of the particle headers. Here is comparison of MyProject and ShooterGame:

ext_dep_myproject.png

When I try to compile code that creates PSC via PCIP

WheelDustPSC_FL = PCIP.CreateDefaultSubobject(this, TEXT("WheelDust_FL"));

I get compiler error:

1>------ Build started: Project: MyProject, Configuration: Development_Editor x64 ------
1>  BSWheeledVehicle.cpp
1>d:\rocket\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(549): error C2440: 'initializing' : cannot convert from 'UParticleSystemComponent *' to 'UObject *'
1>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>          d:\rocket\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(547) : while compiling class template member function 'TSubobjectPtrConstructor::TSubobjectPtrConstructor(SubobjectType *)'
1>          with
1>          [
1>              SubobjectType=UParticleSystemComponent
1>          ]
1>          d:\rocket\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(661) : see reference to function template instantiation 'TSubobjectPtrConstructor::TSubobjectPtrConstructor(SubobjectType *)' being compiled
1>          with
1>          [
1>              SubobjectType=UParticleSystemComponent
1>          ]
1>          D:\Rocket\Projects\MyProject\MyProject\Source\MyProject\BSWheeledVehicle.cpp(14) : see reference to class template instantiation 'TSubobjectPtrConstructor' being compiled
1>          with
1>          [
1>              SubobjectType=UParticleSystemComponent
1>          ]
1>d:\rocket\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(549): error C2439: 'TSubobjectPtrConstructor::Object' : member could not be initialized
1>          with
1>          [
1>              SubobjectType=UParticleSystemComponent
1>          ]
1>          d:\rocket\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(545) : see declaration of 'TSubobjectPtrConstructor::Object'
1>          with
1>          [
1>              SubobjectType=UParticleSystemComponent
1>          ]
1>  -------- End Detailed Actions Stats -----------------------------------------------------------
1>ERROR : UBT error : Failed to produce item: D:\Rocket\Projects\MyProject\MyProject\Binaries\Win64\RocketEditor-MyProject.pdb
1>  Cumulative action seconds (8 processors): 0,00 building projects, 0,51 compiling, 0,00 creating app bundles, 0,00 generating debug info, 0,00 linking, 0,00 other
1>  UBT execution time: 4,64 seconds
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""D:\Rocket\Engine\Binaries\DotNET\UnrealBuildTool.exe" MyProjectEditor Win64 Development "D:\Rocket\Projects\MyProject\MyProject\MyProject.uproject" -rocket" exited with code 1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

This happens in all projects I create. My engine version is 1945001.

Dear Michal,

Try putting this at the top of your .h file that you are calling these functions in

or put it at the top of your YourGame.h file (not as recommended0

//All particle definitions for using functions of UParticleSystemComponent
#include "ParticleDefinitions.h"

:slight_smile:

PS: I know from personal experience that this is required and that it does work, so do give it a try :slight_smile:

Thank you, it helped.

If my answer fully resolves your situation please mark the check mark next to my answer,

otherwise let us know what you still need help with related to this topic :slight_smile:

I’m having the same problem but adding this include did not solve my problem… is there anything else that may cause this?

Hi ColdHell,

This is an old archived post. In order to be better able to assist you, we would recommend that you create a new post with more details about the issue you are experiencing.

Thank you.