internal void DestroyRenderChain()
        {
            if (renderChain == null)
            {
                return;
            }

            renderChain.Dispose();
            renderChain = null;
            ResetAllElementsDataRecursive(attachedPanel.visualTree);
        }
 void DisposeRenderChain()
 {
     if (renderChain != null)
     {
         var oldPanel = renderChain.panel;
         renderChain.Dispose();
         renderChain = null;
         if (oldPanel != null)
         {
             panel.hierarchyChanged      -= OnPanelHierarchyChanged;
             panel.standardShaderChanged -= OnPanelStandardShaderChanged;
             ResetAllElementsDataRecursive(oldPanel.visualTree);
         }
     }
 }