mob-sakai / ParticleEffectForUGUI

Render particle effect in UnityUI(uGUI). Maskable, sortable, and no extra Camera/RenderTexture/Canvas.
MIT License
4.42k stars 625 forks source link

3.3.5 Mesh bounds min=(nan, nan, nan), max=(nan, nan, nan) #275

Closed HFX-93 closed 1 year ago

HFX-93 commented 1 year ago

NOTE: Your issue may already be reported! Please search on the issue tracker before creating one.

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment (please complete the following)

exception_type: Error
exception_message: Mesh '': abnormal mesh bounds - most likely it has some invalid vertices (+/-inifinity or NANs) due to errors exporting. Mesh bounds min=(nan, nan, nan), max=(nan, nan, nan). Please make sure the mesh is exported without any errors.
stack_trace: Coffee.UIExtensions.UIParticleUpdater:BakeMesh(UIParticle) Coffee.UIExtensions.UIParticleUpdater:Refresh(UIParticle) Coffee.UIExtensions.UIParticleUpdater:Refresh() UnityEngine.WillRenderCanvases:Invoke()
screenshot-20231028-170753

I have tried to fix this error in version 3.3.5. May I ask if this modification is correct?

Please add any other context about the issue here. It will help us resolve the issue.

HFX-93 commented 1 year ago

@mob-sakai 1、The time span from version 3.3.5 to version 4.2.2 is too big, and many special effects in the project are not suitable for version 4.2.2, so I still have to use version 3.3.5 for the time being, but I still need to solve this error. Please check whether my handling method is correct. If not, could you please provide me with a solution?

2、This is the specific error message,About 100,000 errors are reported every day: exception_type: Error
exception_message: Mesh '': abnormal mesh bounds - most likely it has some invalid vertices (+/-inifinity or NANs) due to errors exporting. Mesh bounds min=(nan, nan, nan), max=(nan, nan, nan). Please make sure the mesh is exported without any errors.
stack_trace: Coffee.UIExtensions.UIParticleUpdater:BakeMesh(UIParticle) Coffee.UIExtensions.UIParticleUpdater:Refresh(UIParticle) Coffee.UIExtensions.UIParticleUpdater:Refresh() UnityEngine.WillRenderCanvases:Invoke()

image

mob-sakai commented 1 year ago

Hi @HFX-93, thank you for your reporting.

- s_CombineInstances[0].mesh.Clear();
+ s_CombineInstances[0].mesh.Clear(false);
- if (_isTrail && _parent.canSimulate)
+ if (_isTrail && _parent.canSimulate && 0 < s_CombineInstances[0].mesh.vertices.Length)
{
    _renderer.BakeTrailsMesh(s_CombineInstances[0].mesh, bakeCamera, true);
}
HFX-93 commented 1 year ago

@mob-sakai The one you changed does not apply to my current version, I am currently using the submission on February 28, 2021, the version is 3.3.5, please give me a repair plan for my current version, thank you in advance

mob-sakai commented 1 year ago

I would like to know more about this issue. Tell me about your develop/build environment.

repos

HFX-93 commented 1 year ago

@mob-sakai

I would like to know more about this issue. Tell me about your develop/build environment.

  • 〇〇 version 3.3.5
  • Platform: iOS, Android
  • Unity version: 2020.3.4f1c1
  • Build options: IL2CPP、.NET Standard2.0 I can't reproduce this problem because it was all reported by online users, you can look at the code for version 3.3.5.
mob-sakai commented 1 year ago

Try adding Mesh.Clear(false) before BakeMesh() and BakeTrailsMesh(). However, since you did not attach a reproducible project, I cannot certify that it is the correct modification.

+ m.Clear(false);
r.BakeMesh(m, camera, true);
+ m.Clear(false);
r.BakeTrailsMesh(m, camera, true);
HFX-93 commented 1 year ago

@mob-sakai Is that right? image

mob-sakai commented 1 year ago

👍 Hope they fix the issue.

HFX-93 commented 1 year ago

@mob-sakai The version of 4.x has changed too much compared with 3.x, and many special effects in my project will appear abnormal, what should I do about this? Besides, some special effects cannot be adjusted to normal with version 4.x, can I provide you with a project, can you help me to see what the problem is?

mob-sakai commented 1 year ago

Of course.

HFX-93 commented 1 year ago

@mob-sakai Is that right? image

@mob-sakai If this change has no performance impact, I am ready to post it online and see if the player feedback reports the error

mob-sakai commented 1 year ago

I don't think it will be a problem.