What is the difference between UParticleSystemComponent and UParticleSystem?
I don't understand why do I need both UParticleSystemComponent and UParticleSystem? I know that I am able to spawn particle effects with both of these classes. So what can I do with UParticleSystemComponent witch I will not be able to do with UParticleSystem? Should I attach UParticleSystemComponent only to Actors or it is fine to use it with any UObjects?
UParticleSystem is just particule asset
UParticleSystemComponent is a component which places the asset in to actor and world when you spawn actor with it
Every asset type which can be placed in actor have corresponding scene component as scene component define physicality of actors and they only things that can place things in the world.
Also each component that is used for asset placing usually also have corresponding dummy actor that only have that component. Thats why you can drag and drop asset in to the world without need of actor class to be created, that actor class is simply used. In case of UParticleSystem it is AEmitter
It so integrated to core that AActor don't have any positional data without any scene component established as RootComponent. Actors are just component compounds, but component alone can't be placed in the world without a actor.
So way it work is UParticleSystem is set in UParticleSystemComponent which is contained in AEmitter (or other actor containing that compoennt)
So if you want to just place asset in to the world you should just that dummy actor (in this case AEmitter). You can find out which actor to use by droping asset in to the world and class of actor that editor will create is one you should use. If you want to do some repetitive code controlling the particle you should create your own actor class with component or extend that dummy actor class, instead of controlling from outside.
Follow this question
Once you sign in you will be able to subscribe for any updates here