Hi! I’ve ran into something recently while developing a game using Netcode for Entities. The issue is about ghost relevancy on entities with a particle system.
When the relevancy set is set to ‘SetIsRrrelevant’ and an entity with a particle system is spawned and then added to this set for the client, almost everything of the entity disappears on the client-side but the particle system stays behind. The position of the particle system also gets updated as the entity moves. This behavior only seems to happen on the host (host+client setup) from what I have seen.
I thought this was potentially something I did but I managed to recreate it in a Netcode sample, where the same behavior is present. I wanted to add this project to this message but it is way too big to upload here, so if this is useful please contact me and I’ll share the project in some way.
Has anyone run into this before? Is there a way to fix it such that the particle system(s) also properly disappear for the host? I’d very much appreciate any input on this.
wish I had better news, but something weird is going on with particle systems, I have a system that starts and stops particle systems, but it has no effect even though the particle system says it is playing/not playing. Destroying the particle system has no effect either, even though I see it as missing in the entity inspector. Also changing properties of the ParticleSystemRenderer has no effect, it seems like these components are not the ones doing the actual work
That’s unfortunate, really hoped this was some odd edge case. Though, I think you might be onto something.
Looking at the ‘Entity Baking Preview’ of an entity with a particle system shows it has UnityEngine.ParticleSystem and UnityEngine.ParticleSystemRenderer which seem to be duplicates of each other. They hold references to something with the same name as the original (to be baked) GameObject but then with ‘(Clone)’ attached to the name, so it really might be the case that something else is doing the work then.
This might also be the problem at the heart of the Netcode issue but it’s really hard to say.
you need to add a ghost authoring inspection component on the gameobject that has the particle system (I had to unpack the nested prefab for the component not to be greyed out) then click the S for particle system and renderer to not add them to the server prefab
well I also had to exclude the companion related components, but my usecase works now without having to run the particle system modification system in the serverworld