From bcdcd511ccf7140ffb9115df6b67242fc0494097 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Fri, 14 Nov 2014 17:00:11 +0000 Subject: [PATCH] Hide event handler components when Hide Components property is set --- Assets/Fungus/FungusScript/Scripts/FungusScript.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/Fungus/FungusScript/Scripts/FungusScript.cs b/Assets/Fungus/FungusScript/Scripts/FungusScript.cs index 1250ea1a..dfae7c38 100644 --- a/Assets/Fungus/FungusScript/Scripts/FungusScript.cs +++ b/Assets/Fungus/FungusScript/Scripts/FungusScript.cs @@ -383,6 +383,12 @@ namespace Fungus { command.hideFlags = hideComponents ? HideFlags.HideInInspector : HideFlags.None; } + + EventHandler[] eventHandlers = GetComponentsInChildren(); + foreach (EventHandler eventHandler in eventHandlers) + { + eventHandler.hideFlags = hideComponents ? HideFlags.HideInInspector : HideFlags.None; + } } public virtual void ClearSelectedCommands()