mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 22:39:22 +00:00
[BetterShadowClone] Add FPR stuff from exp
This commit is contained in:
parent
540dc679fe
commit
829ad55195
2 changed files with 16 additions and 8 deletions
|
@ -118,14 +118,12 @@ public class SkinnedShadowClone : IShadowClone
|
|||
{
|
||||
// Cleanup instanced Mesh & Materials
|
||||
GameObject shadowMeshObject = _shadowMesh.gameObject;
|
||||
UnityEngine.Object.Destroy(_shadowMeshFilter.sharedMesh);
|
||||
UnityEngine.Object.Destroy(_shadowMeshFilter.mesh);
|
||||
UnityEngine.Object.Destroy(_shadowMeshFilter);
|
||||
|
||||
if (!_hasShadowMaterials)
|
||||
{
|
||||
var materials = _shadowMesh.sharedMaterials;
|
||||
foreach (Material mat in materials) UnityEngine.Object.Destroy(mat);
|
||||
}
|
||||
|
||||
// explain why this works
|
||||
if (_hasShadowMaterials) _shadowMesh.sharedMaterials = _mainMesh.sharedMaterials;
|
||||
foreach (Material mat in _shadowMesh.sharedMaterials) UnityEngine.Object.Destroy(mat);
|
||||
|
||||
UnityEngine.Object.Destroy(_shadowMesh);
|
||||
UnityEngine.Object.Destroy(shadowMeshObject);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue