Screenshot below of what I have.
I cannot seem to “access” and turn off the mesh renderer, short of using Destroy.
Any ideas?
I have tried:
ParticleRenderer render = (ParticleRenderer)entity.gameObject.GetComponentInChildren(typeof(ParticleRenderer));
ParticleEmitter emitter = (ParticleEmitter)entity.gameObject.GetComponentInChildren(typeof(ParticleEmitter));
if (render == null) { DebugConsole.Log("RENDERER IS NULL"); }
if (emitter == null) { DebugConsole.Log("EMITTER IS NULL"); }
render.active = false;
render.enabled = false;
emitter.active = false;
emitter.emit = false;

come on, too many clever people out there…
I’m guessing the script is attached to SkeletonPriest… is it possible that there is another particle emitter on one of the other children of this object? If that were the case, your script would find only one of the emitters.
If this is happening, you can get the child object you want using transform.Find and then get the particle emitter from that specific GameObject.
problem with that is that I need this to be generic - I don’t want to hard code a “Find”, I need it to be dynamic.
No there are no other emitters,etc… on this prefab.
Just ended up iterating through all transforms and disable any particle emitters found. Not efficient, but I simply could not locate that emitter.