Add concealment meter and skinned collider baker; reorganize assets
- ConcealmentMeter: standalone component measuring the percentage of the character volume embedded inside environment geometry (bake -> voxelize via column ray-stabbing parity -> classify interior voxels against box/sphere/ capsule/convex colliders and terrain). Always-on, throttled, gizmo debug. - SkinnedColliderBaker: sole per-frame collider bake owner for skinned rigs. MeshPainter now delegates baking and only borrows BakedMesh for the GPU raster and cache refresh, so the collider stays fresh outside paint mode. - Move pose assets to Assets/Poses, retire unused Insect scripts to Assets/Unused, restore Paintman.controller; mode scripts and scene updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
def10541ab
commit
dcfd668422
29 files changed
+2160
-1656
No files matched your search
@@ -195,6 +195,9 @@ public partial class MeshPainter : MonoBehaviour
|
||||
private SkinnedMeshRenderer _skinned;
|
||||
private MeshCollider _collider;
|
||||
private Mesh _bakedMesh;
|
||||
// When present, this always-on baker owns the collider bake (also outside paint mode); we
|
||||
// stop baking and only borrow its mesh. Null = no baker -> we keep our own legacy bake.
|
||||
private SkinnedColliderBaker _baker;
|
||||
private Material _materialInstance;
|
||||
|
||||
// Mesh caches (in local/collider space).
|
||||
@@ -854,7 +857,7 @@ public partial class MeshPainter : MonoBehaviour
|
||||
// scene unload that does not raise OnApplicationQuit; the once-guard prevents a re-save.
|
||||
SavePaintOnTeardown();
|
||||
|
||||
if (_bakedMesh) Destroy(_bakedMesh);
|
||||
if (_bakedMesh && !_baker) Destroy(_bakedMesh); // _baker owns its mesh; only free our own
|
||||
if (_materialInstance) Destroy(_materialInstance);
|
||||
if (_proceduralMask) Destroy(_proceduralMask);
|
||||
if (_previewMat) Destroy(_previewMat);
|
||||
|
||||
Reference in new issue
Block a user