From 39ab1a3cedf0e7d68768b2863ad92d2865934b98 Mon Sep 17 00:00:00 2001 From: MelekTaus Moribundus Date: Sat, 11 Jul 2026 17:48:29 +0200 Subject: [PATCH] Disable FurShellRenderer globally (not production-ready yet) IsGloballyEnabled() kill switch: Awake destroys the component at runtime, OnEnable self-disables in the editor. Flip the constant to re-enable. Co-Authored-By: Claude Fable 5 --- Assets/Scripts/Components/FurShellRenderer.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Assets/Scripts/Components/FurShellRenderer.cs b/Assets/Scripts/Components/FurShellRenderer.cs index dc1a4c4..a077799 100644 --- a/Assets/Scripts/Components/FurShellRenderer.cs +++ b/Assets/Scripts/Components/FurShellRenderer.cs @@ -19,6 +19,8 @@ namespace Chameleon.Components [ExecuteAlways] public sealed class FurShellRenderer : MonoBehaviour { + public static bool IsGloballyEnabled() => false; + [Header("Shells")] [SerializeField] Material _furMaterial; [SerializeField, Range(1, 64)] int _shellCount = 32; @@ -143,8 +145,25 @@ namespace Chameleon.Components Matrix4x4[] _instances; MaterialPropertyBlock _mpb; + void Awake() + { + if (IsGloballyEnabled()) + { + enabled = true; + return; + } + + Destroy(this); + } + void OnEnable() { + if (!IsGloballyEnabled()) + { + enabled = false; + return; + } + _meshFilter = GetComponent(); // On a skinned avatar the fur borrows this component's per-frame baked pose instead of a // static MeshFilter mesh (see ResolveMesh).