Search Unity

ParticleSystem works in Editor but not in Windows build

Discussion in 'General Graphics' started by jackmott, Nov 1, 2015.

  1. jackmott

    jackmott

    Joined:
    Jan 5, 2014
    Posts:
    167
    I'm setting up a static particle system. I use a prefab ParticleSystem in Resources that I load up, then instantiate via code, and then create particles at runtime.

    Works great in the editor, when I do a build in windows and run it, the particles are not visible, but they will sometimes pop on for a frame or two if I move around, then off again.

    I've confirmed the shader is present in the build. I can see from debug logging that the particles systems are getting created, the material is created, and the material has the shader on it.

    Anyone seen this and have any ideas?

    I've tried a couple different shaders, with the same result, as well.
     
  2. jackmott

    jackmott

    Joined:
    Jan 5, 2014
    Posts:
    167
    Pretty sure I've figured out the problem:
    If the ParticleSystem transform goes off screen, it stops rendering all particles, even if some of the particles would still be visible.

    Easy workaround, but this is dumb behavior, or should be optional. Is there a flag?
     
  3. jackmott

    jackmott

    Joined:
    Jan 5, 2014
    Posts:
    167
    hmm...workaround not so easy. I was able to get this working by making the particlesystem a child of the main camera, and positioning it just in front.

    however rendertocubemap then ceases to function properly, only capturing the face of the cube in front of the camera!

    anyone have other solutions?