UIParticleSystem not working in build, because shader is not included.

Issue #229 resolved
Former user created an issue

Everything is find in Editor, but such errors printed out in Android:


E/Unity   (18171): NullReferenceException
E/Unity   (18171):   at UnityEngine.Material..ctor (UnityEngine.Shader shader) [0x00000] in <filename unknown>:0 
E/Unity   (18171):   at UnityEngine.UI.Extensions.UIParticleSystem.Initialize () [0x00000] in <filename unknown>:0 
E/Unity   (18171):   at UnityEngine.UI.Extensions.UIParticleSystem.Awake () [0x00000] in <filename unknown>:0 
E/Unity   (18171):  
E/Unity   (18171): (Filename:  Line: -1)

According to this, the "UI Extensions/Particles/Additive" shader is not included in build and need to be inside Resources

Comments (6)

  1. furic7

    (I created this issue, just forgot to login)

    I can confirm that putting UI Particle Add.shader into Resources solve the problem.

    Should have warn people when they attach UIParticleSystem, or even better move the shader file into Resources once it get attached.

  2. Simon Jackson

    Odd how that didn't come up in previous testing, but thanks for the fix @furic7 . Will get that updated.

  3. Christian Gascons

    Glad I found this, I was about to place the exact same ticket. I think it’s worth mentioning that downloading the unityPackage (instead of the whole repository in zip format) and importing it into Unity still reproduces this issue since the Resources folder isn’t there yet.

  4. Simon Jackson

    The Unity Package likely won’t have this fix as yet, it’ll only be in dev. WIll look to see if we can speed up the next release.

  5. Christian Gascons

    Sounds great Simon, thanks. We are certainly using the dev src in the meantime, so no rush on our end.

  6. Log in to comment