- Home /
How does one access the mesh variable of a Mesh Particle Emitter?
Apparently ParticleEmitter is a class but MeshParticleEmitter is not. This is a problem when you need to access the mesh : Mesh variable. The ParticleEmitter class does not contain said variable.
Thoughts?
Answer by Eric5h5 · Feb 04, 2010 at 06:10 AM
The mesh used by the mesh filter is the same mesh that's used by the mesh particle emitter, so you can access it that way.
$$anonymous$$akes sense, but how can you access that property if the gameObject with the $$anonymous$$eshParticleEmitter component doesn't have a mesh filter?
To give context, I have a prefab with a mesh particle emitter that will have the mesh property of it deter$$anonymous$$ed at runtime. Since the mesh filter that it will target is not a component of the mesh particle emitter I am instantiating, accessing the mesh filter won't reference the mesh property of the mesh particle emitter.
Does that make sense?
If the game object doesn't have a mesh filter, just add one. Component -> $$anonymous$$esh -> $$anonymous$$esh Filter
Answer by BitMiller · Dec 08, 2010 at 01:22 PM
It only makes sense accessing the mesh variable when you have a mesh on it. Before that why should you do such a thing?
Your answer
Follow this Question
Related Questions
How can I solve my Mesh Particle Emitter problem? 1 Answer
Particle System (shuriken) with mesh particles, change color? 0 Answers
Problems with mesh particle emitter 1 Answer
Particle Effect (Shuriken) mesh emitter how to? 1 Answer
How do I access the extra variables in a Mesh Particle Emitter? 1 Answer