Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Invalid Skinmap in Cloth Renderer
#10
(03-11-2025, 12:07 PM)josemendez Wrote: Hi,

Just followed these steps without issue: the error you mention isn't showing up regardless of the mesh being used to generate the blueprint. I've tried both 2022.3 and Unity 6 on 3 different machines (Windows 10, Windows 11 and MacOS Catalina). Here's a video of the process, maybe you can pinpoint some difference in the workflow that I'm not taking into account:


Hey, 
thank you for taking the time, much appreciated!

I went on searching by myself and found the cause. 
I have ProjectSettings - Editor - 'Enter Play Mode Settings' set to 'Do not reload Domain or Scene'.

With this setting, the clothVertices count is 0 (ObiTearableClothRenderer.cs)

Code:
public override int vertexCount { get { return clothVertices.Count; } }


Do you want to add support for this setting? If not, I may have a custom solution.

The issue is simply that ValidateRenderer() is called before Awake() when the setting is active, so we simply have to call another InstantiateMeshAndSkinmap()
This seams like its working, but probably not super clean (or what do you think, any problems lurking later on?)


Code:
        public override int vertexCount
        {
            get
            {
                if(clothVertices.Count == 0)
                {
                    InstantiateMeshAndSkinmap();
                }
                return clothVertices.Count;
            }
        }


Thanks again!

Reply


Messages In This Thread
Invalid Skinmap in Cloth Renderer - by jaripam - 24-10-2025, 01:26 PM
RE: Invalid Skinmap in Cloth Renderer - by jaripam - 04-11-2025, 10:49 AM
RE: Invalid Skinmap in Cloth Renderer - by Qriva0 - 31-10-2025, 01:08 PM
RE: Invalid Skinmap in Cloth Renderer - by Qriva0 - 31-10-2025, 02:03 PM