Search Unity

Bug Particle System Shape (Mesh Render) not workin in Build

Discussion in 'Editor & General Support' started by Dream_Wood, Sep 12, 2021.

  1. Dream_Wood

    Dream_Wood

    Joined:
    Mar 10, 2018
    Posts:
    2
    Code (CSharp):
    1. renderer = GetComponent<MeshRenderer>();      
    2. ParticleSystem ps = vfxTmp.GetComponent<ParticleSystem>();
    3.         var shape = ps.shape;
    4.         shape.shapeType = ParticleSystemShapeType.MeshRenderer;
    5.         shape.meshRenderer = renderer;
    This way I set fire to the models and it works in the editor. But if you run in build, then it doesn't work. Even transform.parent and transform.position cannot be changed. Which is very strange.



     

    Attached Files:

  2. Bdelcast

    Bdelcast

    Joined:
    Jul 11, 2014
    Posts:
    25
    Hey! So, did you ever manage to figure this out?
    I have a similar situation, a particle with a shape - meshrenderer emission, which is assigned to a procedurallygenerated "beam". When in editor, the particles display around the beam, but on build, SOME particles are clumped in their local 0,0,0.

    It's so buggy