Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Feedback Improve "Particle System is trying to spawn on a mesh with zero surface area" warning

Discussion in 'General Graphics' started by Peter77, Feb 2, 2021.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,625
    Our game sometimes outputs this warning:
    It would be helpful if the warning contains the game object name that is causing the warning, as well as allow to ping the object when selecting the warning in the Console window.
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,393
    This should already contain the particle system as context in the message so clicking the warning should ping it. If its not working could you file a bug report please?
     
    richardkettlewell likes this.
  3. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    300
    The problem with this warning is in a release environment it makes the game unresponsive and does not crash it but instead freezes the game.

    Player.log get insanely big and how should I as a developer know which mesh is the problem, especially when the bug only happens after an hour of playtime in release mode?

    I have several players reporting it to me, but I have no clue how to find the corresponding mesh, which causes the problem.
     
  4. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,289
    Thanks for the feedback. You're totally right. I've just submitted a change to make this message only appear once, and to include the name of the offending system in the message text.

    It won't be backported by default. Please submit a bug report, mentioning this forum thread/my name, if you'd like us to consider backporting it to whichever version you are currently on :)
     
    Last edited: Sep 8, 2022
  5. majidarif

    majidarif

    Joined:
    Sep 11, 2015
    Posts:
    26
    have this issue on my dedicated linux server build. causing a flood of this warning. how can I remove it from my release (dedicated server) build? which shouldn't be using graphics.

    using 2021.3.8f1
     
  6. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,289
    Only way to remove the warning in current unity is to find and fix the offending particle system.
    You could write a script that did FindAllObjectsOfType, then look at the particle systems that use mesh shape emission, get their triangles/vertices, and check yourself for a zero surface area mesh.

    Unity 2023 will make this easier by telling you the broken system in the error message, and only emit the error once.
     
  7. AlvaroNavalmoral

    AlvaroNavalmoral

    Joined:
    Sep 20, 2019
    Posts:
    5
    I have this problem in 2020.3.47f1. How to reproduce:
    - Create empty 3D project.
    - Create a Cube.
    - Create an empty GameObject..
    - Attach a Particle System.
    - Change Shape -> Mesh Renderer, Type -> Triangle, Mesh -> the cube from step 1
    Until here it works OK if you run the scene.

    Now change Prewarm -> On
    Now if you run the scene, you get "Particle System is trying to spawn on a mesh with zero surface area" as soon as the scene starts, although the particle runs fine but ignores the prewarm (it plays like if it's off).
     
    Last edited: Apr 27, 2023
  8. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,289
    If you report a bug via Help/Report a Bug in the Editor, we will take a look.
     
  9. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    383
    This is still an issue - 2022.3.19f1 and this message is completely useless in player.log as it provides no context or reference to the root gameobject.
     
  10. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,289
  11. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    383
    DwinTeimlon likes this.
  12. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,289
    It's not in C#.