Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  When I refer Mesh at OnPreRender() of Camera, Unity Editer Crash.
#3
(14-05-2018, 09:46 AM)josemendez Wrote: Hi,

This is a bug in Unity. The crash happens inside BakeMesh, due to a null reference exception when computing the bind pose bounding box. We can do nothing to fix it, here's the stack strace:

#0  0x00000100aec3a0 in ComputeBoneBindPoseAABB(Matrix4x4f const*, unsigned long, StrideIterator<Vector3f>, BoneWeights4 const*, unsigned long, dynamic_array<BlendShapeVertex, 4ul> const&, MinMaxAABB*)
#1  0x00000100aec124 in Mesh::GetCachedBonesBounds()
#2  0x00000100b3a615 in SkinnedMeshRenderer::CalculateBoneBasedBounds(Matrix4x4f const*, unsigned long, MinMaxAABB&)
#3  0x00000100b40d2a in SkinnedMeshRenderer::BakeMesh(Mesh&)

You should file a bug report.

Anyway, why using BakeMesh when you can access the deformed mesh directly from Obi? (Obi overrides Unity's skinning system, as BakeMesh is extremely slow). Do this instead:
Code:
Mesh m = cloth.clothMesh; //cloth is a ObiCloth component

Hi,
Thank you josemendez!! Arigato Gozaimasu.

I will report this issue to Unity.

Actually...
I want to use another "Drawing Out-Line Plugin".
And I had queried to the development team of that Plugin about this crash issue.
They says that their Plugin includes BakeMesh() method calling in OnPreRender() method.
However, BakeMesh() calling is Hidden in dll file.
So I cannot use your code that access to "cloth.clothMesh" directly.
I (=That Plugin) must use BakeMash() for getting Mesh Information...

Do you have anything like "Non-Unity Skinning System Override Mode"?
Or Can I edit script for switching to "Non-Unity Skinning System Override Mode"?
Reply


Messages In This Thread
RE: When I refer Mesh at OnPreRender() of Camera, Unity Editer Crash. - by tomonori - 15-05-2018, 06:41 AM