From b4a64f2a4eea3cf80ea81bb4e8400e0b084ff7d1 Mon Sep 17 00:00:00 2001 From: Reina_Sakiria <99442371+ReinaS-64892@users.noreply.github.com> Date: Wed, 1 Nov 2023 19:07:04 +0900 Subject: [PATCH] fix: Visible Head Accessory incorrectly applied when building for Quest standalone (#514) --- Editor/VisibleHeadAccessoryProcessor.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Editor/VisibleHeadAccessoryProcessor.cs b/Editor/VisibleHeadAccessoryProcessor.cs index 1d6f5933..7026453a 100644 --- a/Editor/VisibleHeadAccessoryProcessor.cs +++ b/Editor/VisibleHeadAccessoryProcessor.cs @@ -80,6 +80,13 @@ namespace nadena.dev.modular_avatar.core.editor bool Process(ModularAvatarVisibleHeadAccessory target) { +#if UNITY_ANDROID + foreach (var target in _avatar.GetComponentsInChildren(true)) + { + Object.DestroyImmediate(target); + } + return; +#endif bool didWork = false; if (Validate(target) == ReadyStatus.Ready) @@ -161,4 +168,4 @@ namespace nadena.dev.modular_avatar.core.editor return status; } } -} \ No newline at end of file +}