From 93a6a54ec0fca69dba11ca2e80ff01cff3324a2e Mon Sep 17 00:00:00 2001 From: Jai Dhyani Date: Sun, 17 Apr 2022 19:34:52 -0700 Subject: [PATCH] Make draggable handle work for grand(^n)children Draggable handle works so long as the handle is any descendent of the menu, so I changed this line in my instance and it seems to Just Work. Thank you again for making this, and for giving it away for free. I'm getting a ton of use out of it. --- Scripts/Core/Runtime/Behaviours/SimpleSideMenu.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/Core/Runtime/Behaviours/SimpleSideMenu.cs b/Scripts/Core/Runtime/Behaviours/SimpleSideMenu.cs index 1ae69f3..952edc2 100644 --- a/Scripts/Core/Runtime/Behaviours/SimpleSideMenu.cs +++ b/Scripts/Core/Runtime/Behaviours/SimpleSideMenu.cs @@ -169,7 +169,7 @@ private bool IsValidConfig Debug.LogError("[SimpleSideMenu] Transition speed cannot be less than or equal to zero.", gameObject); valid = false; } - if (handle != null && isHandleDraggable && handle.transform.parent != rectTransform) + if (handle != null && isHandleDraggable && !handle.transform.IsChildOf(rectTransform)) { Debug.LogError("[SimpleSideMenu] The drag handle must be a child of the side menu in order for it to be draggable.", gameObject); valid = false; @@ -483,4 +483,4 @@ public void Close() } #endregion } -} \ No newline at end of file +}