Hi,
I have a problem rendering a particle system in ios. While it runs fine in the editor, it doesn't look the same while I run the game on an ipad mini. I tried different shaders but nothing seems to work. Here follows the code and I have also attached two screenshots to show the problem.
Many thanks for the help, I hope my question is not too newbie.
Thanks
Ioannis
![alt text][1]
![alt text][2]
void Awake () {
GameObject parent = new GameObject ("test");
ParticleSystem particlesystem = parent.AddComponent ();
ParticleSystem.Particle[] p = new ParticleSystem.Particle[1];
p [0].size = 2;
p [0].position = new Vector3 (0, 10, 0);
p [0].color = Color.green;
ParticleSystemRenderer pr = (ParticleSystemRenderer)particlesystem.renderer;
pr.renderMode = ParticleSystemRenderMode.Billboard;
pr.sortingOrder = 1;
particlesystem.renderer.material.shader = Shader.Find ("Mobile/Particles/Additive");
//particlesystem.renderer.material.shader = Shader.Find ("Mobile/Particles/Additive Culled");
//particlesystem.renderer.material.shader = Shader.Find ("Mobile/Particles/Alpha Blended");
//particlesystem.renderer.material.shader = Shader.Find ("Mobile/Particles/Multiply");
//particlesystem.renderer.material.shader = Shader.Find ("Mobile/Particles/Multiply Culled");
//particlesystem.renderer.material.shader = Shader.Find ("Mobile/Particles/VertexLit Blended");
//particlesystem.renderer.material.shader = Shader.Find ("Mobile/Transparent/Vertex Color");
//particlesystem.renderer.material.shader = Shader.Find ("Sprites/Default");
particlesystem.SetParticles (p, 1);
particlesystem.startSpeed = 0;
particlesystem.startSize = 0;
particlesystem.Emit (1);
particlesystem.Pause ();
}
[1]: /storage/temp/33497-ipadmini.png
[2]: /storage/temp/33498-macmini.png
↧