Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by ioannis.f · Oct 10, 2014 at 03:39 PM · shaderiosrenderingparticle

Problem rendering particles in ios

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 alt text

      void Awake () {
         GameObject parent = new GameObject ("test");
         ParticleSystem particlesystem = parent.AddComponent<ParticleSystem> ();
         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 ();
     }


ipadmini.png (36.3 kB)
macmini.png (29.6 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Owen-Reynolds · Oct 10, 2014 at 04:26 PM

That solid pink color is the standard "bad material" material.

Wondering if it isn't just a path problem, or a resourse loading issue? Shader.Find ("Mobile/Particles/Additive"); on line 13 may be returning null on iOS.

Do you need to build the material in game? Can't have it premade?

If I have to, I usually just make slots in the script and load the elements (shaders, textures) into the Inspector. Have the code read them from there.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ioannis.f · Oct 10, 2014 at 04:33 PM 1
Share

$$anonymous$$any thanks, you are right, it doesn't find the shader. Just by adding the particle system component in the inspector, using default shader, and adding particles in code, it works!

avatar image skoun ioannis.f · Jul 25, 2016 at 07:30 PM 1
Share

Hello ioannis.f, please can you tell me exact steps how you fixed it ? Currently I have same problem and I dont know what I should do. Please help me. Thank you

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

What is the in right way to Warm Up Shaders? 1 Answer

How to rendering to screen in plugin for ios 0 Answers

Specular bug on iOS/Android using Standard shader 2 Answers

Streamed textures appearing as default white only on iOS 0 Answers

See through issue in iOs 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges