I have been helped to find out that i can add an MPE with script
var pe : ParticleEmitter = wallChild.AddComponent("MeshParticleEmitter") as ParticleEmitter;
also I have learned that not all variables are exposed to scripting(I need Interpolate Triangles and the Normal Velocities). I am creating different shaped and sized meshes on the fly and want to add the MPE to the mesh. On the bright side, the settings I want from the MPE are always the same, just not the default settings. So can I do any of these things?
Adjust the default settings of MPE when AddComponent is called, it would load the MPE with Interpolate Triangles ON and The Min and Max Normal Velocities to 1 - like the Unity MPE page suggests you set!
I have an MPE on a gameobect in the game with the correct settings. Can I copy the MPE settings from the base mesh to my MPE settings on the created mesh?
Have a prefab with the correct MPE in it and Instantiate it and add to the created mesh. I am trying to do this with little luck as shown.
var flameFire : Transform = Instantiate(FloorScript.FlameStuff, childWall.position,
Quaternion.identity) as Transform;
flameFire.parent = wall.transform.Find("Cube");
but something is wrong the MPE doesn't take the shape of the mesh of "Cube".
Nov 20 '10 at 05:44 AM