@@ -22,7 +22,7 @@ public class MeshiaCascadingAvatarMeshSimplifier : MonoBehaviour
2222 public List < MeshiaCascadingAvatarMeshSimplifierRendererEntry > Entries = new ( ) ;
2323 public int TargetTriangleCount = 70000 ;
2424 public bool AutoAdjustEnabled = true ;
25-
25+
2626 public void RefreshEntries ( )
2727 {
2828 using ( ListPool < Renderer > . Get ( out var ownedRenderers ) )
@@ -135,6 +135,7 @@ public record MeshiaCascadingAvatarMeshSimplifierRendererEntry
135135 public AvatarObjectReference RendererObjectReference ;
136136 public int TargetTriangleCount ;
137137 public MeshSimplifierOptions Options ;
138+ public ulong PreserveBorderEdgesBones ;
138139 public bool Enabled ;
139140 public bool Fixed ;
140141
@@ -144,6 +145,37 @@ public MeshiaCascadingAvatarMeshSimplifierRendererEntry(Renderer renderer)
144145 RendererObjectReference . Set ( renderer . gameObject ) ;
145146 TargetTriangleCount = RendererUtility . GetMesh ( renderer ) ? . GetTriangleCount ( ) ?? 0 ;
146147 Options = MeshSimplifierOptions . Default ;
148+ PreserveBorderEdgesBones =
149+ ( 1ul << ( int ) HumanBodyBones . LeftThumbProximal ) |
150+ ( 1ul << ( int ) HumanBodyBones . LeftThumbIntermediate ) |
151+ ( 1ul << ( int ) HumanBodyBones . LeftThumbDistal ) |
152+ ( 1ul << ( int ) HumanBodyBones . LeftIndexProximal ) |
153+ ( 1ul << ( int ) HumanBodyBones . LeftIndexIntermediate ) |
154+ ( 1ul << ( int ) HumanBodyBones . LeftIndexDistal ) |
155+ ( 1ul << ( int ) HumanBodyBones . LeftMiddleProximal ) |
156+ ( 1ul << ( int ) HumanBodyBones . LeftMiddleIntermediate ) |
157+ ( 1ul << ( int ) HumanBodyBones . LeftMiddleDistal ) |
158+ ( 1ul << ( int ) HumanBodyBones . LeftRingProximal ) |
159+ ( 1ul << ( int ) HumanBodyBones . LeftRingIntermediate ) |
160+ ( 1ul << ( int ) HumanBodyBones . LeftRingDistal ) |
161+ ( 1ul << ( int ) HumanBodyBones . LeftLittleProximal ) |
162+ ( 1ul << ( int ) HumanBodyBones . LeftLittleIntermediate ) |
163+ ( 1ul << ( int ) HumanBodyBones . LeftLittleDistal ) |
164+ ( 1ul << ( int ) HumanBodyBones . RightThumbProximal ) |
165+ ( 1ul << ( int ) HumanBodyBones . RightThumbIntermediate ) |
166+ ( 1ul << ( int ) HumanBodyBones . RightThumbDistal ) |
167+ ( 1ul << ( int ) HumanBodyBones . RightIndexProximal ) |
168+ ( 1ul << ( int ) HumanBodyBones . RightIndexIntermediate ) |
169+ ( 1ul << ( int ) HumanBodyBones . RightIndexDistal ) |
170+ ( 1ul << ( int ) HumanBodyBones . RightMiddleProximal ) |
171+ ( 1ul << ( int ) HumanBodyBones . RightMiddleIntermediate ) |
172+ ( 1ul << ( int ) HumanBodyBones . RightMiddleDistal ) |
173+ ( 1ul << ( int ) HumanBodyBones . RightRingProximal ) |
174+ ( 1ul << ( int ) HumanBodyBones . RightRingIntermediate ) |
175+ ( 1ul << ( int ) HumanBodyBones . RightRingDistal ) |
176+ ( 1ul << ( int ) HumanBodyBones . RightLittleProximal ) |
177+ ( 1ul << ( int ) HumanBodyBones . RightLittleIntermediate ) |
178+ ( 1ul << ( int ) HumanBodyBones . RightLittleDistal ) ;
147179 Enabled = true ;
148180 Fixed = false ;
149181 }
@@ -187,6 +219,7 @@ internal void ResolveReference(Component container)
187219 RendererObjectReference . Get ( container ) ;
188220 }
189221 }
222+
190223}
191224
192225#endif
0 commit comments