public void OnDestroy(string panelName, string widgetName) { UIBehaviour uiBehaviour = GetUIBehaviour(panelName, widgetName); if (uiBehaviour != null) { uiBehaviour.OnDestroy(); } }