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