public override void Dispose() { Panel.Dispose(); if (HorizontalScrollbar != null) { HorizontalScrollbar.Dispose(); } if (VerticalScrollbar != null) { VerticalScrollbar.Dispose(); } }
private void RemoveHorizontalScrollbar() { Panel.HorizontalScrollbar = null; if (HorizontalScrollbar != null) { Panel.Height += HorizontalScrollbar.Height; HorizontalScrollbar.Dispose(); GameObject.DestroyImmediate(HorizontalScrollbar.Control.GameObject); HorizontalScrollbar = null; } }