x


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?

more ▼

asked Feb 04 '10 at 05:17 AM

CJCurrie gravatar image

CJCurrie
692 7 11 25

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

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.

more ▼

answered Feb 04 '10 at 06:10 AM

Eric5h5 gravatar image

Eric5h5
81.5k 42 133 529

Makes sense, but how can you access that property if the gameObject with the MeshParticleEmitter 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 determined 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?

Feb 04 '10 at 11:16 PM CJCurrie

If the game object doesn't have a mesh filter, just add one. Component -> Mesh -> Mesh Filter

Feb 04 '10 at 11:51 PM Eric5h5
(comments are locked)
10|3000 characters needed characters left

It only makes sense accessing the mesh variable when you have a mesh on it. Before that why should you do such a thing?

more ▼

answered Dec 08 '10 at 01:22 PM

BitMiller gravatar image

BitMiller
197 15 15 24

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1403
x335
x91

asked: Feb 04 '10 at 05:17 AM

Seen: 2369 times

Last Updated: Feb 04 '10 at 05:17 AM